Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport the hexdoc-hexcasting web book to 1.19 #547

Merged
merged 41 commits into from
Apr 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
e17868d
Add properties, remove unnecessary files
object-Object Sep 2, 2023
9a7a503
Fix validation errors
object-Object Sep 2, 2023
11078e4
Merge branch '0.9.5-docs' into 0.10.3-docs
object-Object Sep 2, 2023
8e2b968
Fix validation errors
object-Object Sep 2, 2023
37b1352
Serve static resources on this branch so we don't try to build langua…
object-Object Sep 10, 2023
d9567ac
Fix relative path
object-Object Sep 10, 2023
0392039
Localize link text
object-Object Sep 10, 2023
d029ca1
Update props for dev15
object-Object Oct 17, 2023
b9b4d69
Add namespaced template imports
object-Object Oct 19, 2023
fa6853a
Update gitignore
object-Object Nov 21, 2023
af7774a
Merge remote-tracking branch 'origin/0.10.3-docs' into 1.19
object-Object Nov 21, 2023
60ee34d
Copy hexdoc-hexcasting plugin into 1.19
object-Object Nov 21, 2023
81aebb8
Fix missing links
object-Object Nov 21, 2023
417a51f
Remove --allow-missing from nodemon.json
object-Object Nov 23, 2023
06a0cc2
Use TRACE instead of DEBUG
object-Object Nov 23, 2023
c10cad5
Remove outdated README info
object-Object Nov 26, 2023
2fc257c
Remove hexdoc resources
object-Object Nov 26, 2023
2932ae5
Use TypeTaggedTemplate for brainsweep recipes instead of macros
object-Object Dec 2, 2023
e4ddee0
Add workflow_call event
object-Object Dec 2, 2023
768bcca
Add build-group-id and bump hatch-gradle-version
object-Object Dec 2, 2023
45cc642
Maybe fix build-group-id
object-Object Dec 2, 2023
f1db266
Bump web book version from refs/heads/1.19
object-Object Dec 2, 2023
0be7685
Switch to new context style [ci skip]
object-Object Dec 17, 2023
e29ae91
Add link_overrides
object-Object Dec 17, 2023
d239e7d
Fix ci
object-Object Dec 18, 2023
8036062
Bump required hexdoc version
object-Object Dec 18, 2023
327ad0b
Bump version to 1.0.dev22
object-Object Dec 18, 2023
1221253
Add warning if no patterns were found
object-Object Dec 28, 2023
3c7d0e8
Bump version to 1.0.dev23
object-Object Jan 12, 2024
6359584
Merge remote-tracking branch 'upstream/1.19' into 1.19
object-Object Mar 29, 2024
1d523b9
Bump hexdoc dependency to a10
object-Object Mar 29, 2024
9f0ecb5
Integrated new rendering options using a Rust -> WASM
JohnDog3112 Jan 8, 2024
24393ff
Switched color palettes to match HexBug better.
JohnDog3112 Jan 12, 2024
5879a5e
Renamed render.js to hexcasting_render.js and added the animated opti…
JohnDog3112 Jan 12, 2024
5345370
Removed inline styles for CSS
JohnDog3112 Jan 12, 2024
6f94779
Renamed colors, switched them to what HexBug uses, and removed transp…
JohnDog3112 Jan 12, 2024
253627c
Setup all of the names/interfaces to be localized
JohnDog3112 Jan 18, 2024
7817a43
Improve appearance of pattern rendering dropdown
object-Object Mar 29, 2024
f06c992
Bump version to 1.0.dev24
object-Object Mar 29, 2024
c55f5d1
Update hexdoc plugin license
object-Object Mar 29, 2024
2486d61
Merge branch '1.19' into 1.19
object-Object Apr 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 52 additions & 21 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,60 @@
name: Build the Python doc-gen
name: Build the web book

on:
push:
branches: [main]
branches: '1.19'
workflow_dispatch:
inputs:
release:
description: Release this version
type: boolean
default: false
publish:
description: Package index to publish to
type: choice
options:
- none
- PyPI

env:
PYPI_PACKAGE: hexdoc-hexcasting

permissions:
contents: read

jobs:
build_docs:
runs-on: ubuntu-latest
hexdoc:
uses: hexdoc-dev/hexdoc/.github/workflows/hexdoc.yml@main
permissions:
contents: write
pages: read
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
python-version: "3.11"
release: |-
${{
github.event_name != 'push' && inputs.release
|| github.event_name == 'push' && startsWith(github.event.head_commit.message, '[Release]')
}}

publish-pypi:
runs-on: ubuntu-latest
needs: hexdoc
if: |-
needs.hexdoc.outputs.release == 'true' &&
(github.event_name == 'push' || inputs.publish == 'PyPI')
environment:
name: pypi
url: https://pypi.org/p/${{ env.PYPI_PACKAGE }}
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Generate file
run: doc/collate_data.py Common/src/main/resources hexcasting thehexbook doc/template.html index.html.uncommitted
- name: Check out gh-pages
uses: actions/checkout@v3
with:
clean: false
ref: gh-pages
- name: Overwrite file and commmit
run: |
mv index.html.uncommitted index.html
git config user.name "Documentation Generation Bot"
git config user.email "[email protected]"
git add index.html
git diff-index --quiet HEAD || git commit -m "Update docs at index.html from $GITHUB_REF"
- name: Upload changes
run: git push
- name: Download package artifact
uses: actions/download-artifact@v3
with:
name: hexdoc-build
path: dist

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
166 changes: 166 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# hexdoc
doc/**/_export/generated/
/_site/
/_checkout/
__gradle_version__.py
.hexdoc/

# eclipse
bin
*.launch
Expand All @@ -21,9 +28,168 @@ build
eclipse
run

# MacOS moment
.DS_Store

# Files from Forge MDK
forge*changelog.txt

Session.vim
plot/


# Python

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/
8 changes: 4 additions & 4 deletions Common/src/main/resources/assets/hexcasting/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@
"hexcasting.page.101.4.header": "An Example",
"hexcasting.page.101.4": "It's interesting to note that the $(italic)rotation/$ of a pattern doesn't seem to matter at all. These two patterns both perform an action called $(l:patterns/basics#hexcasting:get_caster)$(action)Mind's Reflection/$, for example.",
"hexcasting.page.101.5": "A _Hex is cast by drawing (valid) actions in sequence. Each action might do one of a few things:$(li)Gather some information about the environment, leaving it on the top of the stack;$(li)manipulate the info gathered (e.g. adding two numbers); or$(li)perform some magical effect, like summoning lightning or an explosion. (These actions are called \"spells.\")$(p)When I start casting a _Hex, it creates an empty stack. Actions manipulate the top of that stack.",
"hexcasting.page.101.6": "For example, $(l:patterns/basics#hexcasting:get_caster)$(action)Mind's Reflection/$ will create an iota representing $(italic)me/$, the caster, and add it to the top of the stack. $(l:patterns/basics#hexcasting:get_entity_pos)$(action)Compass Purification/$ will take the iota at the top the stack, if it represents an entity, and transform it into an iota representing that entity's location.$(br2)So, drawing those patterns in that order would result in an iota on the stack representing my position.",
"hexcasting.page.101.6": "For example, $(l:patterns/basics#hexcasting:get_caster)$(action)Mind's Reflection/$ will create an iota representing $(italic)me/$, the caster, and add it to the top of the stack. $(l:patterns/basics#hexcasting:entity_pos/eye)$(action)Compass Purification/$ will take the iota at the top the stack, if it represents an entity, and transform it into an iota representing that entity's location.$(br2)So, drawing those patterns in that order would result in an iota on the stack representing my position.",
"hexcasting.page.101.7": "$(thing)Iotas/$ can represent things like myself or my position, but there are several other types I can manipulate with $(thing)Actions/$. Here's a comprehensive list:$(li)Numbers (which some legends called \"doubles\");$(li)Vectors, a collection of three numbers representing a position, movement, or direction in the world;$(li)Booleans or \"bools\" for short, representing an abstract True or False,",
"hexcasting.page.101.8": "$(li)Entities, like myself, chickens, and minecarts;$(li)Influences, peculiar types of iota that seem to represent abstract ideas;$(li)Patterns themselves, used for crafting magic items and truly mind-boggling feats like $(italic)spells that cast other spells/$; and$(li)A list of several of the above, gathered into a single iota.",
"hexcasting.page.101.9": "Of course, there's no such thing as a free lunch. All spells, and certain other actions, require _media as payment.$(br2)The best I can figure, a _Hex is a little bit like a plan of action presented to Nature-- in this analogy, the _media is used to provide the arguments to back it up, so Nature will accept your plan and carry it out.",
Expand Down Expand Up @@ -864,7 +864,7 @@
"hexcasting.page.basics_pattern.get_entity_look": "Transforms an entity on the stack into the direction it's looking in, as a unit vector.",
"hexcasting.page.basics_pattern.print": "Displays the top iota of the stack to me.",
"hexcasting.page.basics_pattern.raycast.1": "Combines two vectors (a position and a direction) into the answer to the question: If I stood at the position and looked in the direction, what block would I be looking at? Costs a negligible amount of _media.",
"hexcasting.page.basics_pattern.raycast.2": "If it doesn't hit anything, the vectors will combine into $(l:casting/influences)$(thing)Null/$.$(br2)A common sequence of patterns, the so-called \"raycast mantra,\" is $(action)Mind's Reflection/$, $(action)Compass Purification/$, $(action)Mind's Reflection/$, $(action)Alidade Purification/$, $(action)Archer's Distillation/$. Together, they return the vector position of the block I am looking at.",
"hexcasting.page.basics_pattern.raycast.2": "If it doesn't hit anything, the vectors will combine into $(l:casting/influences)$(thing)Null/$.$(br2)A common sequence of patterns, the so-called \"raycast mantra,\" is $(l:patterns/basics#hexcasting:get_caster)$(action)Mind's Reflection/$, $(l:patterns/basics#hexcasting:entity_pos/eye)$(action)Compass Purification/$, $(l:patterns/basics#hexcasting:get_caster)$(action)Mind's Reflection/$, $(l:patterns/basics#hexcasting:get_entity_look)$(action)Alidade Purification/$, $(l:patterns/basics#hexcasting:raycast)$(action)Archer's Distillation/$. Together, they return the vector position of the block I am looking at.",
"hexcasting.page.basics_pattern.raycast/axis.1": "Like $(l:patterns/basics#hexcasting:raycast)$(action)Archer's Distillation/$, but instead returns a vector representing the answer to the question: Which $(italic)side/$ of the block am I looking at? Costs a negligible amount of _media.",
"hexcasting.page.basics_pattern.raycast/axis.2": "More specifically, it returns the $(italic)normal vector/$ of the face hit, or a unit vector pointing perpendicular to the face.$(li)If I am looking at a floor, it will return (0, 1, 0).$(li)If I am looking at the south face of a block, it will return (0, 0, 1).",
"hexcasting.page.basics_pattern.raycast/entity": "Like $(l:patterns/basics#hexcasting:raycast)$(action)Archer's Distillation/$, but instead returns the $(italic)entity/$ I am looking at. Costs a negligible amount of _media.",
Expand Down Expand Up @@ -951,15 +951,15 @@
"hexcasting.page.stackmanip.stack_len": "Pushes the size of the stack as a number to the top of the stack. (For example, a stack of [0, 1] will become [0, 1, 2].)",
"hexcasting.page.stackmanip.duplicate_n": "Removes the number at the top of the stack, then copies the top iota of the stack that number of times. (A count of 2 results in two of the iota on the stack, not three.)",
"hexcasting.page.stackmanip.fisherman": "Grabs the element in the stack indexed by the number and brings it to the top.",
"hexcasting.page.stackmanip.fisherman/copy": "Like $(action)Fisherman's Gambit/$, but instead of moving the iota, copies it.",
"hexcasting.page.stackmanip.fisherman/copy": "Like $(l:patterns/stackmanip#hexcasting:fisherman)$(action)Fisherman's Gambit/$, but instead of moving the iota, copies it.",
"hexcasting.page.stackmanip.mask.1": "An infinite family of actions that keep or remove elements at the top of the stack based on the sequence of dips and lines.",
"hexcasting.page.stackmanip.mask.2": "Assuming that I draw a Bookkeeper's Gambit pattern left-to-right, the number of iotas the action will require is determined by the horizontal distance covered by the pattern. From deepest in the stack to shallowest, a flat line will keep the iota, whereas a triangle dipping down will remove it.$(br2)If my stack contains $(italic)0, 1, 2/$ from deepest to shallowest, drawing the first pattern opposite will give me $(italic)1/$, the second will give me $(italic)0/$, and the third will give me $(italic)0, 2/$ (the 0 at the bottom is left untouched).",
"hexcasting.page.stackmanip.swizzle.1": "Rearranges the top elements of the stack based on the given numerical code, which is the index of the permutation wanted.",
"hexcasting.page.stackmanip.swizzle.2": "Although I can't pretend to know the mathematics behind calculating this permutation code, I have managed to dig up an extensive chart of them, enumerating all permutations of up to six elements.$(br2)If I wish to do further study, the key word is \"Lehmer Code.\"",
"hexcasting.page.stackmanip.swizzle.link": "Table of Codes",

"hexcasting.entry.logic": "Logical Operators",
"hexcasting.page.logic.bool_coerce": "Convert an argument to a boolean. The number $(thing)0/$, $(l:influences#null)$(thing)Null/$, and the empty list become False; everything else becomes True.",
"hexcasting.page.logic.bool_coerce": "Convert an argument to a boolean. The number $(thing)0/$, $(l:casting/influences)$(thing)Null/$, and the empty list become False; everything else becomes True.",
"hexcasting.page.logic.not": "If the argument is True, return False; if it is False, return True.",
"hexcasting.page.logic.or": "Returns True if at least one of the arguments are True; otherwise returns False.",
"hexcasting.page.logic.and": "Returns True if both arguments are true; otherwise returns False.",
Expand Down
Loading
Loading