Tool to build and perform checks on WCA Regulations and Guidelines
Project description
WCA Regulations Compiler
This is a tool to check, build, compare WCA Regulations and Guidelines and its translations.
Install from PyPi
Just run pip install wrc
.
External dependencies
If you want to build the pdf versions, you need the patched qt version of wkhtmltopdf in your $PATH
.
These stable standalone binaries are available here for several platforms.
For CJK translations you also need to install some packages providing CJK fonts. The official build uses "UnBatang" for Korean (package fonts-unfonts-core
or alike), "WenQuanYi Micro Hei" for Chinese (package fonts-wqy-microhei
or alike), and "IPAX0208PGothic" for Japanese (package fonts-ipafont
or alike).
Run the thing
Here are some sample invocations:
- To check the Regulations and Guidelines:
wrc path/to/wca-regulations --target=check
- To build the html to the
build
directory:wrc path/to/wca-regulations --target=html --output=build
- To merge the Regulations and Guidelines into a single document (works with html, pdf and json targets):
wrc path/to/wca-regulations --target=html --output=build --merged
- When building translation it's necessary to provide the language (to choose the appropriate font/pdf names):
wrc path/to/wca-regulations-translations/french --language=french --target=pdf --output=build
- Check that a translation matches exactly the original rules:
wrc path/to/wca-regulations-translations/french --diff=path/to/wca-regulations
You can also take a look at the travis script used in the translations repository.
Running from the sources
The compiler is built on top of python lex/yacc implementation ply
, so you probably need to run pip install ply
to install it.
When this is done, you can use python -m wrc.wrc
from the repository's root instead of wrc
.
If you want to use wrc-states
from the source, an easy way to do this is to run python -c "from wrc.wrc import states; states()"
Deploying to PyPi
(section for maintainers in PyPi)
- Bump the version number in
wrc/version.py
and inpyproject-toml
- (optional, depends on your environment)
pip install --upgrade build
python -m build
twine upload dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file wrc-1.6.0.tar.gz
.
File metadata
- Download URL: wrc-1.6.0.tar.gz
- Upload date:
- Size: 725.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 839d2ce64bcf26f5521e11007cc696d7ffa5fef0c27f7c1f0bba6a5f5fcd94ba |
|
MD5 | 1f601f17dd2ea38d7a46288dad0b1e6d |
|
BLAKE2b-256 | 390b9b27f11d7f6359d1f4f0602da88c272f4ed0c3cf96208d36bb9a6bd773f2 |
File details
Details for the file wrc-1.6.0-py3-none-any.whl
.
File metadata
- Download URL: wrc-1.6.0-py3-none-any.whl
- Upload date:
- Size: 726.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | baedf0617ed6b161183d1f9bc85488273c6b03baec0455b96deaac1c824665a9 |
|
MD5 | d7ef065c52f68827ad2404a9a051b88b |
|
BLAKE2b-256 | d80df6d82f5dfe8e69a73413a27e1eb14f25fa073df082dd40f0858dc5a52da9 |