Skip to content

Commit 289869a

Browse files
committed
v0.7.4
1 parent 7176f62 commit 289869a

165 files changed

Lines changed: 5327 additions & 4444 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/generate-release-notes.sh

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
if [[ $# -eq 0 ]]; then
6+
echo "No arguments provided. Usage: generate-release-notes.sh <version>"
7+
exit 1
8+
fi
9+
10+
version=$1
11+
12+
# Release version number without "v" prefix to match the format of changelog.json.
13+
version_number="${version#v}"
14+
15+
# This parses the JSON blob for this specific version from changelog.json.
16+
changelog="$(
17+
jq --arg version "$version_number" --compact-output \
18+
'.changelog [] | select(.ver == $version)' \
19+
data/changelog.json
20+
)"
21+
22+
if [[ -z "$changelog" ]]; then
23+
echo "Changelog entry for version $version does not exist."
24+
exit 1
25+
fi
26+
27+
{
28+
# The "hub" tool reads all text up to the first empty line as the release
29+
# title.
30+
# * For changelog entries with a title, this is formatted as
31+
# '<version>, "<title>" Edition' to match the format of the site's
32+
# changelog page.
33+
#
34+
# * For changelog entries without a title, this is formatted as simply
35+
# '<version>'.
36+
echo -n "$version"
37+
jq -r 'if has("title") then ", \(.title | tojson) Edition\n" else "\n" end' <<< "$changelog"
38+
39+
# Some changelogs include an alternate title. This is included in the body
40+
# of the release notes and formatted as 'AKA "<altTitle>" Edition' to match
41+
# the site's changelog page.
42+
jq -j 'if has("titleAlt") then "AKA \(.titleAlt | tojson) Edition\n" else "" end' <<< "$changelog"
43+
44+
# Changelog text is already markdown-formatted, so no additional formatting
45+
# needs to be done here.
46+
jq -r '.txt' <<< "$changelog"
47+
}

.github/workflows/main.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,17 @@ on:
44
push:
55
tags:
66
- 'v**'
7+
# Allow running manually from the actions tab
8+
workflow_dispatch:
79

810
env:
911
# See: https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions#upgrading-a-workflow-that-accesses-ghcrio
1012
IMAGE_NAME: pf2etools
1113

14+
concurrency:
15+
group: "release"
16+
cancel-in-progress: true
17+
1218
jobs:
1319
build-and-deploy:
1420
runs-on: ubuntu-latest
@@ -19,9 +25,12 @@ jobs:
1925
uses: easimon/wipe-cache@main
2026

2127
# See: https://stackoverflow.com/a/58178121
22-
- name: Set Env
28+
- name: Set Release Version
2329
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
2430

31+
- name: Generate Release Notes
32+
run: bash ./.github/generate-release-notes.sh ${{ env.RELEASE_VERSION }} | tee RELEASE_NOTES.md
33+
2534
- name: Archive Release
2635
run: |
2736
zip -r pf2ools-${{ env.RELEASE_VERSION }}.zip . -x '*.git*' '*node_modules*' '*.github*' '*img*' '*.editorconfig*' '*CNAME*'
@@ -66,7 +75,7 @@ jobs:
6675
- name: Upload Release
6776
# Add the files one-by-one in an effort to avoid timeouts
6877
run: |
69-
hub release create -a pf2ools-${{ env.RELEASE_VERSION }}.zip -m ${{ env.RELEASE_VERSION }} ${{ env.RELEASE_VERSION }}
78+
hub release create -a pf2ools-${{ env.RELEASE_VERSION }}.zip -F RELEASE_NOTES.md ${{ env.RELEASE_VERSION }}
7079
for f in $(find . -name 'img-${{ env.RELEASE_VERSION }}.*' -print); do hub release edit ${{ env.RELEASE_VERSION }} -m '' -a $f; done
7180
env:
7281
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ secrets
88

99
# Visual Studio Code project files
1010
.vscode/
11+
*.code-workspace
1112

1213
# Generated files
1314
sitemap.xml

README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
## Pf2e.Tools
2-
[![Build and Deploy](https://github.com/Pf2eToolsOrg/Pf2eTools/actions/workflows/main.yml/badge.svg)](https://github.com/Pf2eToolsOrg/Pf2eTools/actions/workflows/main.yml)
1+
# Pf2e.Tools
2+
3+
[![pages-build-deployment](https://github.com/Pf2eToolsOrg/Pf2eTools/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/Pf2eToolsOrg/Pf2eTools/actions/workflows/pages/pages-build-deployment) [![Build and Deploy](https://github.com/Pf2eToolsOrg/Pf2eTools/actions/workflows/main.yml/badge.svg)](https://github.com/Pf2eToolsOrg/Pf2eTools/actions/workflows/main.yml)
34

45
Visit the main site (not yet) or go to the unofficial GitHub [mirror](https://pf2etools.com).
56

@@ -12,40 +13,50 @@ Please see [our Discord server](https://discord.gg/2hzNxErtVu) for FAQs, install
1213
---
1314

1415
## Developer Notes
16+
1517
### Data Sources and Versioning
18+
1619
Only "official" (that is, published by Paizo) data is to be included in the site. Anything else should be added to the homebrew repository.
1720

1821
Prioritise RAW above all else. Aim to provide a 1:1 copy of the original data. Obvious typos (for instance, mathematical errors in creature statblocks) may be corrected at the discretion of the maintainer(s).
1922

2023
Aim to use the latest version of any published material. Older versions which are sufficiently different (and relevant to community interests) can be moved to the homebrew repository.
2124

2225
### Target JavaScript Version
26+
2327
Targeting ES6 was the original intent, but more modern features have long since crept into the code. Therefore, if something is available as standard in both Chrome and Firefox (preferably in versions dating back at least a couple of months), and isn't bleeding-edge, one can reasonable justify using it. As with all things, use common sense.
2428

2529
### Style Guidelines
30+
2631
#### Code
32+
2733
- Use tabs over spaces.
2834

2935
#### CSS
36+
3037
- The [BEM](http://getbem.com/) ("Block Element Modifier") naming strategy should be used where possible.
3138

3239
#### Data/Text
40+
3341
- Format JSON to match the default output of JavaScript's `JSON.stringify` (using tabs for indentation), i.e. one line per bracket and one line per value. JSON files programmatically generated from other JSON files (i.e. those stored in `data/generated`) should be minified, however.
3442

3543
- When "tagging" references in data (e.g. `{@creature goblin}`), the following rules apply:
36-
- Only tag references which are _intended as references_. For example, the Wizard class in `You gain one cantrip of your choice from the wizard spell list` should be tagged, whereas the Wizard class in `Together, a group of seven powerful wizards sought to contain the demon` should not be tagged. One is a reference to the mechanical class, one is merely the casual usage of the word "wizard."
37-
- In a similar vein, never tag anything within a `quote`-type block. Even if the quote directly refers to a specific creature, we can assume the quote is from a universe/perspective in which (for example) statblocks don't exist, and therefore the tag should be omitted to maintain the flavour of the quote.
38-
- Within data from a source, avoid referencing content from a source printed after the publication of that source.
44+
- Only tag references which are _intended as references_. For example, the Wizard class in `You gain one cantrip of your choice from the wizard spell list` should be tagged, whereas the Wizard class in `Together, a group of seven powerful wizards sought to contain the demon` should not be tagged. One is a reference to the mechanical class, one is merely the casual usage of the word "wizard."
45+
- In a similar vein, never tag anything within a `quote`-type block. Even if the quote directly refers to a specific creature, we can assume the quote is from a universe/perspective in which (for example) statblocks don't exist, and therefore the tag should be omitted to maintain the flavour of the quote.
46+
- Within data from a source, avoid referencing content from a source printed after the publication of that source.
3947

4048
### JSON Cleaning
49+
4150
#### Trailing commas
51+
4252
To remove trailing commas in JSON:
4353

4454
Find: `(.*?)(,)(:?\s*]|\s*})`
4555

4656
Replace: `$1$3`
4757

4858
#### Character replacement
59+
4960
- `` should be replaced with `'`
5061
- `` and `` should be replaced with `"`
5162
- `` (em dash) should be replaced with `\u2014` (Unicode for em dash)
@@ -55,24 +66,29 @@ Replace: `$1$3`
5566
- the only Unicode escape sequences allowed are `\u2014`, `\u2013`, and `\u2212`; all other characters (unless noted above) should be stored as-is
5667

5768
#### Convention for dashes
69+
5870
- `-` (hyphen) should **only** be used to hyphenate words, e.g. `60-foot` and `18th-level`
5971
- `\u2014` should be used for parenthetical dash pairs, or for marking empty table rows.
6072
- `\u2013` should be used for joining numerical ranges, e.g. `1-5` should become `1\u20135`.
6173
- `\u2212` should be used for unary minus signs, in the case of penalties. For example, `"You have a -5 penalty to..."` should become `"You have a \u22125 penalty to..."`.
6274
- any whitespace on any side of a `\u2014` should be removed
6375

6476
#### Convention for measurement
77+
6578
- Adjectives: a hyphen and the full name of the unit of measure should be used, e.g. dragon exhales acid in a `60-foot line`
6679
- Nouns: a space and the short name of the unit of measure (including the trailing period) should be used, e.g. `blindsight 60 ft.`, `darkvision 120 ft.`
6780
- Time: a slash, `/`, with no spaces on either side followed by the capitalised unit of time, e.g. `2/Turn`, `3/Day`
6881

6982
#### Convention for Dice
83+
7084
Dice should be written as `[X]dY[ <+|-|×> Z]`, i.e. with a space between dice and operator, and a space between operator and modifier. Some examples of acceptable formatting are: `d6`, `2d6`, or `2d6 + 1`.
7185

7286
#### Convention for Item Names
87+
7388
Item names should be title-case, with the exception of units in parentheses, which should be sentence-case. Items who's volume or amount is specified by container (e.g. `(vial)`) treat the container as a unit.
7489

7590
### Mouse/Keyboard Events
91+
7692
Avoid binding ALT-modified events, as these are not available under MacOS or various Linux flavors. Binding SHIFT-/CTRL-modified events is preferred.
7793

7894
### Dev Server

css/style.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

data/ancestries/ancestry-poppet.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@
213213
"source": "LOTGB",
214214
"page": 63,
215215
"entries": [
216-
"You have the form of a child's tiny toy or doll, but you don't let your small size impede your joy of life. Instead of {@trait Small}, your size is {@trait Tiny}. Like other {@trait Tiny} creatures, you don't automatically receive lesser cover from being in a larger creature's space, but circumstances might allow you to {@action Take Cover}. You can purchase weapons, armor, and other items for your size with the same statistics as normal gear, except that melee weapons have a reach of 0 for you (or a reach 5 feet shorter than normal if they have the {@trait reach} trait). You can enter another creature's space, which is important because you must usually enter a creature's space to attack it with melee {@action Strike||Strikes}! {@quickref Remember to adjust the Bulk of items and your Bulk limit for Tiny size||1|Items and Sizes}. The information on how to handle {@trait Tiny} PCs, including rules for attempting to ride on other characters, appears on page 66 of the Pathfinder Lost Omens Ancestry Guide."
216+
"You have the form of a child's tiny toy or doll, but you don't let your small size impede your joy of life. Instead of {@trait Small}, your size is {@trait Tiny}. Like other {@trait Tiny} creatures, you don't automatically receive lesser cover from being in a larger creature's space, but circumstances might allow you to {@action Take Cover}. You can purchase weapons, armor, and other items for your size with the same statistics as normal gear, except that melee weapons have a reach of 0 for you (or a reach <5 feet> shorter than normal if they have the {@trait reach} trait). You can enter another creature's space, which is important because you must usually enter a creature's space to attack it with melee {@action Strike||Strikes}! {@quickref Remember to adjust the Bulk of items and your Bulk limit for Tiny size||1|Items and Sizes}. The information on how to handle {@trait Tiny} PCs, including rules for attempting to ride on other characters, appears on page 66 of the Pathfinder Lost Omens Ancestry Guide."
217217
]
218218
},
219219
{

data/ancestries/ancestry-sprite.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
"page": 128,
127127
"name": "Tiny PCs",
128128
"entries": [
129-
"PCs are typically Small or Medium size, but most sprite PCs are Tiny instead! Being Tiny comes with its own set of rules about space and reach. Your Tiny sprite can enter another creature's space, which is important because your melee {@action Strike||Strikes} typically have no reach, meaning you must enter their space to attack them. Like other Tiny creatures, you don't automatically receive lesser cover from being in a larger creature's space, but circumstances might allow you to {@action Take Cover}. You can purchase weapons, armor, and other items for your size with the same statistics as normal gear, except that melee weapons have a reach of 0 for you (or a reach 5 feet shorter than normal if they have the reach trait). Remember to adjust the {@table Bulk Conversions||Bulk of items and your Bulk limit for Tiny size}."
129+
"PCs are typically Small or Medium size, but most sprite PCs are Tiny instead! Being Tiny comes with its own set of rules about space and reach. Your Tiny sprite can enter another creature's space, which is important because your melee {@action Strike||Strikes} typically have no reach, meaning you must enter their space to attack them. Like other Tiny creatures, you don't automatically receive lesser cover from being in a larger creature's space, but circumstances might allow you to {@action Take Cover}. You can purchase weapons, armor, and other items for your size with the same statistics as normal gear, except that melee weapons have a reach of 0 for you (or a reach <5 feet> shorter than normal if they have the reach trait). Remember to adjust the {@table Bulk Conversions||Bulk of items and your Bulk limit for Tiny size}."
130130
]
131131
},
132132
{

data/archetypes.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"entries": [
3636
"The flow of time is an unstoppable force. Most are carried downstream inexorably, like a leaf floating on a river. You, however, somehow fell out of the flow of time, if only for an instant, but in doing so gained a perspective that few others have.",
3737
"Now you stand on the banks of the river, watching the flow, choosing where to dive in, or even defying the current, at least for a short while, as you skim its surface and skip from moment to moment. As a chronoskimmer, time is yours to exploit.",
38-
"You have the means to see the timelines of all creatures, including your own. You can use this insight to manipulate the flow of time for creatures, much like you can pluck the leaf from the river and place it elsewhere. Manipulating timelines can be dangerous, however, and the Dimension of Time isn't wont to allow these transgressions against time to stand forever. The threat always looms of time dimensionals coming to correct your actions or of you becoming removed from time forever."
38+
"You have the means to see the timelines of all creatures, including your own. You can use this insight to manipulate the flow of time for creatures, much like you can pluck the leaf from the river and place it elsewhere. Manipulating timelines can be dangerous, however, and the {@place Dimension of Time} won't allow these transgressions against time to stand forever. The threat always looms of time dimensionals coming to correct your actions or of you becoming removed from time forever."
3939
],
4040
"dedicationLevel": 2
4141
},

data/backgrounds/backgrounds-apg.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,7 @@
205205
"name": "Warding Sign",
206206
"activity": {
207207
"number": 1,
208-
"unit": "reaction",
209-
"entry": "{@as R}"
208+
"unit": "reaction"
210209
},
211210
"components": [
212211
"(concentrate)"

0 commit comments

Comments
 (0)