Skip to main content

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/*

Metadata

Release files for wrc 1.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wrc 1.7.1
File Size Uploaded Provenance Actions
wrc-1.7.1.tar.gz 725.8 kB Without provenance Details for wrc-1.7.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wrc 1.7.1
File Interpreter ABI Platform Actions
wrc-1.7.1-py3-none-any.whl Python 3 none any Details for wrc-1.7.1-py3-none-any.whl

Total release size: 1.5 MB

Release files / wrc-1.7.1.tar.gz

Download URL wrc-1.7.1.tar.gz
Size 725.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6bec6f92319b1319faa5eeade1cb15de49d14d4e117b9221ce77e1012a5a7d60
BLAKE2b-256 checksum
How to use checksums
4b91e65443a299e53fd1b8fc020e039ab1b82c3b2f4fcd5078a27c8e949bb1fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / wrc-1.7.1-py3-none-any.whl

Download URL wrc-1.7.1-py3-none-any.whl
Size 726.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3ad12a2c539bc3509066e05c33c10b63b716b2a1df7076f37125ba9b5529c227
BLAKE2b-256 checksum
How to use checksums
fc4c60c93af0e8cdfcb9e8f9a01bdf8aba1feb8620945b79a4576e3d8a647faa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Security for wrc 1.7.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.7.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page