Skip to content

Commit

Permalink
v0.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
MrVauxs committed Nov 17, 2022
1 parent 7176f62 commit 289869a
Show file tree
Hide file tree
Showing 165 changed files with 5,327 additions and 4,444 deletions.
47 changes: 47 additions & 0 deletions .github/generate-release-notes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash

set -e

if [[ $# -eq 0 ]]; then
echo "No arguments provided. Usage: generate-release-notes.sh <version>"
exit 1
fi

version=$1

# Release version number without "v" prefix to match the format of changelog.json.
version_number="${version#v}"

# This parses the JSON blob for this specific version from changelog.json.
changelog="$(
jq --arg version "$version_number" --compact-output \
'.changelog [] | select(.ver == $version)' \
data/changelog.json
)"

if [[ -z "$changelog" ]]; then
echo "Changelog entry for version $version does not exist."
exit 1
fi

{
# The "hub" tool reads all text up to the first empty line as the release
# title.
# * For changelog entries with a title, this is formatted as
# '<version>, "<title>" Edition' to match the format of the site's
# changelog page.
#
# * For changelog entries without a title, this is formatted as simply
# '<version>'.
echo -n "$version"
jq -r 'if has("title") then ", \(.title | tojson) Edition\n" else "\n" end' <<< "$changelog"

# Some changelogs include an alternate title. This is included in the body
# of the release notes and formatted as 'AKA "<altTitle>" Edition' to match
# the site's changelog page.
jq -j 'if has("titleAlt") then "AKA \(.titleAlt | tojson) Edition\n" else "" end' <<< "$changelog"

# Changelog text is already markdown-formatted, so no additional formatting
# needs to be done here.
jq -r '.txt' <<< "$changelog"
}
13 changes: 11 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@ on:
push:
tags:
- 'v**'
# Allow running manually from the actions tab
workflow_dispatch:

env:
# 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
IMAGE_NAME: pf2etools

concurrency:
group: "release"
cancel-in-progress: true

jobs:
build-and-deploy:
runs-on: ubuntu-latest
Expand All @@ -19,9 +25,12 @@ jobs:
uses: easimon/wipe-cache@main

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

- name: Generate Release Notes
run: bash ./.github/generate-release-notes.sh ${{ env.RELEASE_VERSION }} | tee RELEASE_NOTES.md

- name: Archive Release
run: |
zip -r pf2ools-${{ env.RELEASE_VERSION }}.zip . -x '*.git*' '*node_modules*' '*.github*' '*img*' '*.editorconfig*' '*CNAME*'
Expand Down Expand Up @@ -66,7 +75,7 @@ jobs:
- name: Upload Release
# Add the files one-by-one in an effort to avoid timeouts
run: |
hub release create -a pf2ools-${{ env.RELEASE_VERSION }}.zip -m ${{ env.RELEASE_VERSION }} ${{ env.RELEASE_VERSION }}
hub release create -a pf2ools-${{ env.RELEASE_VERSION }}.zip -F RELEASE_NOTES.md ${{ env.RELEASE_VERSION }}
for f in $(find . -name 'img-${{ env.RELEASE_VERSION }}.*' -print); do hub release edit ${{ env.RELEASE_VERSION }} -m '' -a $f; done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ secrets

# Visual Studio Code project files
.vscode/
*.code-workspace

# Generated files
sitemap.xml
Expand Down
26 changes: 21 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Pf2e.Tools
[![Build and Deploy](https://github.com/Pf2eToolsOrg/Pf2eTools/actions/workflows/main.yml/badge.svg)](https://github.com/Pf2eToolsOrg/Pf2eTools/actions/workflows/main.yml)
# Pf2e.Tools

[![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)

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

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

## Developer Notes

### Data Sources and Versioning

Only "official" (that is, published by Paizo) data is to be included in the site. Anything else should be added to the homebrew repository.

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).

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.

### Target JavaScript Version

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.

### Style Guidelines

#### Code

- Use tabs over spaces.

#### CSS

- The [BEM](http://getbem.com/) ("Block Element Modifier") naming strategy should be used where possible.

#### Data/Text

- 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.

- When "tagging" references in data (e.g. `{@creature goblin}`), the following rules apply:
- 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."
- 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.
- Within data from a source, avoid referencing content from a source printed after the publication of that source.
- 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."
- 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.
- Within data from a source, avoid referencing content from a source printed after the publication of that source.

### JSON Cleaning

#### Trailing commas

To remove trailing commas in JSON:

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

Replace: `$1$3`

#### Character replacement

- `` should be replaced with `'`
- `` and `` should be replaced with `"`
- `` (em dash) should be replaced with `\u2014` (Unicode for em dash)
Expand All @@ -55,24 +66,29 @@ Replace: `$1$3`
- the only Unicode escape sequences allowed are `\u2014`, `\u2013`, and `\u2212`; all other characters (unless noted above) should be stored as-is

#### Convention for dashes

- `-` (hyphen) should **only** be used to hyphenate words, e.g. `60-foot` and `18th-level`
- `\u2014` should be used for parenthetical dash pairs, or for marking empty table rows.
- `\u2013` should be used for joining numerical ranges, e.g. `1-5` should become `1\u20135`.
- `\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..."`.
- any whitespace on any side of a `\u2014` should be removed

#### Convention for measurement

- 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`
- 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.`
- Time: a slash, `/`, with no spaces on either side followed by the capitalised unit of time, e.g. `2/Turn`, `3/Day`

#### Convention for Dice

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`.

#### Convention for Item Names

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.

### Mouse/Keyboard Events

Avoid binding ALT-modified events, as these are not available under MacOS or various Linux flavors. Binding SHIFT-/CTRL-modified events is preferred.

### Dev Server
Expand Down
4 changes: 2 additions & 2 deletions css/style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/ancestries/ancestry-poppet.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
"source": "LOTGB",
"page": 63,
"entries": [
"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."
"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."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion data/ancestries/ancestry-sprite.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"page": 128,
"name": "Tiny PCs",
"entries": [
"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}."
"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}."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion data/archetypes.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"entries": [
"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.",
"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.",
"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."
"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."
],
"dedicationLevel": 2
},
Expand Down
3 changes: 1 addition & 2 deletions data/backgrounds/backgrounds-apg.json
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,7 @@
"name": "Warding Sign",
"activity": {
"number": 1,
"unit": "reaction",
"entry": "{@as R}"
"unit": "reaction"
},
"components": [
"(concentrate)"
Expand Down
Loading

0 comments on commit 289869a

Please sign in to comment.