# 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
- `python2 setup.py egg_info`
- `python2 setup.py sdist bdist_wheel`
- `twine upload dist/*`
Metadata
Release files for wrc 1.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wrc-1.1.5.tar.gz | 718.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wrc-1.1.5-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 1.4 MB
Release files / wrc-1.1.5.tar.gz
| Download URL | wrc-1.1.5.tar.gz |
|---|---|
| Size | 718.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12f0f70c2ce3ef2bce49590a1cc5188e55cb6404523b95f6d3e52c26f0744f1f
|
|
BLAKE2b-256 checksum How to use checksums |
68311db38faae27edcb8a44a5afb206823c79c8e661338bf159166f4eee2d2b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / wrc-1.1.5-py2-none-any.whl
| Download URL | wrc-1.1.5-py2-none-any.whl |
|---|---|
| Size | 708.8 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
fba4cd41f1560d0a5304e62b7f88fa9179c59886dfbc24e07db4fc35e5799331
|
|
BLAKE2b-256 checksum How to use checksums |
6b3a1e0cbe491cc06400d1adadcbdad306e4cdb0342f783c6f2efa301e908a26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |