Skip to main content

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 in pyproject-toml
  • (optional, depends on your environment) pip install --upgrade build
  • python -m build
  • twine upload dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wrc-1.5.0.tar.gz (725.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wrc-1.5.0-py3-none-any.whl (726.3 kB view details)

Uploaded Python 3

File details

Details for the file wrc-1.5.0.tar.gz.

File metadata

  • Download URL: wrc-1.5.0.tar.gz
  • Upload date:
  • Size: 725.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for wrc-1.5.0.tar.gz
Algorithm Hash digest
SHA256 2d449f9f3c038129c3338af11a53649e02baa3ba89282a0b90a5c552deedc8d9
MD5 96ee78fe9474f47ebc2dfbb170c169eb
BLAKE2b-256 8a905a7d6c1847f95b25be0e18fe7d442d2ee81e50f2302fd2379048ec550f27

See more details on using hashes here.

File details

Details for the file wrc-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: wrc-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 726.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for wrc-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 99ac7bfb5599f34e2cc86eee368c02f6f75d5ba2566316de3ff958ac27cd6e23
MD5 237fdc490b904efce1875b7f6f69bdb9
BLAKE2b-256 3be524c6febe8c799a3bbf63e0dff47cea17556ae37dba08b58f503b646fbdfc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page