wrc


Namewrc JSON
Version 1.6.0 PyPI version JSON
download
home_pageNone
SummaryTool to build and perform checks on WCA Regulations and Guidelines
upload_time2024-08-06 06:50:40
maintainerNone
docs_urlNone
authorNone
requires_python>=3.0
licenseGPLv3
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# 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`
- 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](https://github.com/thewca/wca-regulations-translations/blob/master/travis.sh) 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/*`

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "wrc",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.0",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Philippe Virouleau <philippe.44@gmail.com>, WCA Software Team <software@worldcubeassociation.org>",
    "download_url": "https://files.pythonhosted.org/packages/39/0b/9b27f11d7f6359d1f4f0602da88c272f4ed0c3cf96208d36bb9a6bd773f2/wrc-1.6.0.tar.gz",
    "platform": null,
    "description": "\n# WCA Regulations Compiler\n\nThis is a tool to check, build, compare WCA Regulations and Guidelines and its translations.\n\n## Install from PyPi\n\nJust run `pip install wrc`.\n\n## External dependencies\n\nIf you want to build the pdf versions, you need the **patched qt** version of [wkhtmltopdf](http://wkhtmltopdf.org/) in your `$PATH`.\nThese stable standalone binaries are available [here](http://wkhtmltopdf.org/downloads.html) for several platforms.\n\nFor 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).\n\n## Run the thing\n\nHere are some sample invocations:\n\n- To check the Regulations and Guidelines:\n`wrc path/to/wca-regulations --target=check`\n- To build the html to the `build` directory:\n`wrc path/to/wca-regulations --target=html --output=build`\n- To merge the Regulations and Guidelines into a single document (works with html, pdf and json targets):\n`wrc path/to/wca-regulations --target=html --output=build --merged`\n- When building translation it's necessary to provide the language (to choose the appropriate font/pdf names):\n`wrc path/to/wca-regulations-translations/french --language=french --target=pdf --output=build`\n- Check that a translation matches exactly the original rules:\n`wrc path/to/wca-regulations-translations/french --diff=path/to/wca-regulations`\n\nYou 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.\n\n\n## Running from the sources\n\nThe compiler is built on top of python lex/yacc implementation `ply`, so you probably need to run `pip install ply` to install it.\nWhen this is done, you can use `python -m wrc.wrc` from the repository's root instead of `wrc`.\nIf 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()\"`\n\n## Deploying to PyPi\n\n(section for maintainers in PyPi)\n\n- Bump the version number in `wrc/version.py` and in `pyproject-toml`\n- (optional, depends on your environment) `pip install --upgrade build`\n- `python -m build`\n- `twine upload dist/*`\n",
    "bugtrack_url": null,
    "license": "GPLv3",
    "summary": "Tool to build and perform checks on WCA Regulations and Guidelines",
    "version": "1.6.0",
    "project_urls": {
        "Homepage": "https://github.com/thewca/wca-regulations-compiler",
        "Issues": "https://github.com/thewca/wca-regulations-compiler/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d80df6d82f5dfe8e69a73413a27e1eb14f25fa073df082dd40f0858dc5a52da9",
                "md5": "d7ef065c52f68827ad2404a9a051b88b",
                "sha256": "baedf0617ed6b161183d1f9bc85488273c6b03baec0455b96deaac1c824665a9"
            },
            "downloads": -1,
            "filename": "wrc-1.6.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d7ef065c52f68827ad2404a9a051b88b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.0",
            "size": 726383,
            "upload_time": "2024-08-06T06:50:37",
            "upload_time_iso_8601": "2024-08-06T06:50:37.530463Z",
            "url": "https://files.pythonhosted.org/packages/d8/0d/f6d82f5dfe8e69a73413a27e1eb14f25fa073df082dd40f0858dc5a52da9/wrc-1.6.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "390b9b27f11d7f6359d1f4f0602da88c272f4ed0c3cf96208d36bb9a6bd773f2",
                "md5": "1f601f17dd2ea38d7a46288dad0b1e6d",
                "sha256": "839d2ce64bcf26f5521e11007cc696d7ffa5fef0c27f7c1f0bba6a5f5fcd94ba"
            },
            "downloads": -1,
            "filename": "wrc-1.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1f601f17dd2ea38d7a46288dad0b1e6d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.0",
            "size": 725455,
            "upload_time": "2024-08-06T06:50:40",
            "upload_time_iso_8601": "2024-08-06T06:50:40.330822Z",
            "url": "https://files.pythonhosted.org/packages/39/0b/9b27f11d7f6359d1f4f0602da88c272f4ed0c3cf96208d36bb9a6bd773f2/wrc-1.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-06 06:50:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "thewca",
    "github_project": "wca-regulations-compiler",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "wrc"
}
        
Elapsed time: 0.33205s