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](http://wkhtmltopdf.org/) in your `$PATH`.
These stable standalone binaries are available [here](http://wkhtmltopdf.org/downloads.html) 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`
- 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](https://github.com/thewca/wca-regulations-translations/blob/master/travis.sh) used in the translations repository.


## Running from the sources

Note: the whole project is written using python 2.7, if something goes wrong it's likely because your `python` command defaults to python 3.

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

## Deploying to PyPi

(section for maintainers in PyPi)

- Bump the version number in `wrc/version.py`
- Clean the `dist` and `wrc.egg_info` directories
- `python setup.py egg_info`
- `python setup.py sdist bdist_wheel`
- `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.1.4.tar.gz (718.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.1.4-py2-none-any.whl (708.7 kB view details)

Uploaded Python 2

File details

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

File metadata

  • Download URL: wrc-1.1.4.tar.gz
  • Upload date:
  • Size: 718.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for wrc-1.1.4.tar.gz
Algorithm Hash digest
SHA256 1f7185cbc0a7cfcee3af674809c0ecbc3a55f539f68161d9e083d757c2f7732b
MD5 0d55ac93db895c81b8d3c69674b5e0b4
BLAKE2b-256 03f26b7c940eae4e460f7438edf1c62efe477c98d422932136f59cb18753c4f4

See more details on using hashes here.

File details

Details for the file wrc-1.1.4-py2-none-any.whl.

File metadata

  • Download URL: wrc-1.1.4-py2-none-any.whl
  • Upload date:
  • Size: 708.7 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for wrc-1.1.4-py2-none-any.whl
Algorithm Hash digest
SHA256 a7ad272c84dd694b753a2df023a1ecc35bbf14dc26fe2a5fb1d0cb54ef6180a4
MD5 5f75fb0e0faa7e3b681e77689a4ee612
BLAKE2b-256 c082e7562d57be12a9b79c92d3640d77ba813ccb5744488b90d6af46db0f8956

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