wodcraft


Namewodcraft JSON
Version 0.1.6 PyPI version JSON
download
home_pageNone
SummaryWrite, lint, and compile CrossFit workouts (WODs) with a simple language and CLI. Export JSON/ICS, build a movements catalog, and get a quick timeline.
upload_time2025-09-13 08:32:50
maintainerNone
docs_urlNone
authorWODCraft Authors
requires_python>=3.9
licenseApache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. ... (texte complet : https://www.apache.org/licenses/LICENSE-2.0) END OF TERMS AND CONDITIONS Copyright 2025 Nicolas Caussin - caussin@aumana-consulting.com Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
keywords crossfit dsl wod fitness parser lark
VCS
bugtrack_url
requirements lark pytest black
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # WODCraft

English | [Français](README.fr.md)

WODCraft is a Domain‑Specific Language (DSL) to describe, validate, and export Workouts of the Day (WODs). It ships a single, unified CLI to parse, lint, compile sessions, and export (JSON/ICS), with support for tracks and gender through a movements catalog.

## Why
- Standardize how WODs are written, readable by coaches and tools.
- Automate useful formats: timer timeline, calendar, web, API.
- Normalize variants (tracks, dual reps/cals/loads) via a JSON catalog.
- Provide a solid base for AI agents to analyze/generate WODs.

## DSL at a Glance
```wod
WOD "Team Mixer"
TEAM 2
TRACKS [RX, INTERMEDIATE, SCALED]
CAP 20:00

BUYIN {
  400m run;
}

BLOCK AMRAP 12:00 WORK split:any {
  12 wall_balls @9kg SYNC;
  10 box_jumps @24in;
  200m run;
}

CASHOUT {
  50 double_unders @each;
}
```
The full grammar and rules are in WODCraft_spec.md (source of truth).

## Features
- Parser → structured JSON AST.
- Linter → errors/warnings (e.g., E010 REST>0, E020 EMOM without slots, W001 unknown movement, W002 suspicious load, W050 alias).
- Resolution → applies `--track`/`--gender` and an optional JSON `--catalog`.
- Timeline → `run` produces an event sequence (text or JSON).
- Export → `export` to `json`, `html`, `ics`.
- Formatting → `fmt` (minimal safe normalization of `.wod` files).

## Quick Setup
- Python 3 recommended. Isolated env:
  - `make install` (creates `.venv` and installs `requirements.txt`)
  - or `pip install -r requirements.txt`

## CLI Usage (unified)
- Validate: `wodc validate examples/language/team_realized_session.wod`
- Parse: `wodc parse examples/language/team_realized_session.wod`
- Session → JSON/ICS: `wodc session examples/language/team_realized_session.wod --modules-path modules --format json`
- Results aggregate: `wodc results examples/language/team_realized_session.wod --modules-path modules`
- Catalog build: `wodc catalog build`

Makefile shortcuts: `make help` (venv, install, test, catalog-build, vnext-validate, vnext-session, vnext-results, build-dist).

## Tests
- Run: `make test` or `pytest -q`
- Coverage includes: parser, lint (E/W), resolution (catalog/gender), timeline, formatter.

## Spec and Architecture
- DSL spec: see `WODCraft_spec.md`.
- Unified CLI: `src/wodcraft/cli.py` (entrypoint `wodc`).
- Language core: `src/wodcraft/lang/core.py` (façade over vNext core).
- vNext core: `wodc_vnext/core.py` (modules/sessions/types), slated to be merged under `src/`.
- Examples under `examples/` and modules under `modules/`. Movements catalog at `data/movements_catalog.json`.

## Editor Support
- VS Code/Windsurf extension (local): see `editor/wodcraft-vscode/` for syntax highlighting and snippets.
- Quick dev run: `code --extensionDevelopmentPath=./editor/wodcraft-vscode .`

## Examples (Language / Programming)
- `examples/language/programming_plan.wod`: minimal “Coach Programming” block
- `examples/language/team_realized_session.wod`: session with team + realized events for aggregation

## Roadmap
- Advanced formatter (indentation/blocks), macros and shorthands (`21-15-9`).
- Versioned grammar and canonical `wodc fmt`.
- Executable timer for gym use.

## Contributing
- Read `AGENTS.md` (conventions, structure, commands).
- Open focused PRs with CLI examples and export artifacts.

## 📜 License

- **Code (DSL, tools, generators)** : [Apache 2.0](./LICENSE)  
- **Content (docs, movement list, examples, images/videos)** : [CC-BY-SA 4.0](./LICENSE-docs)  

In summary:  
You can freely use WODCraft in your projects, including commercial ones, as long as you cite the source.  
Content (movements, docs, etc.) must remain open and under the same CC-BY-SA license.

---

© 2025 Nicolas Caussin - caussin@aumana-consulting.com

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "wodcraft",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "crossfit, dsl, wod, fitness, parser, lark",
    "author": "WODCraft Authors",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/26/6b/eb7bff476eb939ae5dd0bca3586ea7b03755a102c7be7c76fc977b3fe9c9/wodcraft-0.1.6.tar.gz",
    "platform": null,
    "description": "# WODCraft\n\nEnglish | [Fran\u00e7ais](README.fr.md)\n\nWODCraft is a Domain\u2011Specific Language (DSL) to describe, validate, and export Workouts of the Day (WODs). It ships a single, unified CLI to parse, lint, compile sessions, and export (JSON/ICS), with support for tracks and gender through a movements catalog.\n\n## Why\n- Standardize how WODs are written, readable by coaches and tools.\n- Automate useful formats: timer timeline, calendar, web, API.\n- Normalize variants (tracks, dual reps/cals/loads) via a JSON catalog.\n- Provide a solid base for AI agents to analyze/generate WODs.\n\n## DSL at a Glance\n```wod\nWOD \"Team Mixer\"\nTEAM 2\nTRACKS [RX, INTERMEDIATE, SCALED]\nCAP 20:00\n\nBUYIN {\n  400m run;\n}\n\nBLOCK AMRAP 12:00 WORK split:any {\n  12 wall_balls @9kg SYNC;\n  10 box_jumps @24in;\n  200m run;\n}\n\nCASHOUT {\n  50 double_unders @each;\n}\n```\nThe full grammar and rules are in WODCraft_spec.md (source of truth).\n\n## Features\n- Parser \u2192 structured JSON AST.\n- Linter \u2192 errors/warnings (e.g., E010 REST>0, E020 EMOM without slots, W001 unknown movement, W002 suspicious load, W050 alias).\n- Resolution \u2192 applies `--track`/`--gender` and an optional JSON `--catalog`.\n- Timeline \u2192 `run` produces an event sequence (text or JSON).\n- Export \u2192 `export` to `json`, `html`, `ics`.\n- Formatting \u2192 `fmt` (minimal safe normalization of `.wod` files).\n\n## Quick Setup\n- Python 3 recommended. Isolated env:\n  - `make install` (creates `.venv` and installs `requirements.txt`)\n  - or `pip install -r requirements.txt`\n\n## CLI Usage (unified)\n- Validate: `wodc validate examples/language/team_realized_session.wod`\n- Parse: `wodc parse examples/language/team_realized_session.wod`\n- Session \u2192 JSON/ICS: `wodc session examples/language/team_realized_session.wod --modules-path modules --format json`\n- Results aggregate: `wodc results examples/language/team_realized_session.wod --modules-path modules`\n- Catalog build: `wodc catalog build`\n\nMakefile shortcuts: `make help` (venv, install, test, catalog-build, vnext-validate, vnext-session, vnext-results, build-dist).\n\n## Tests\n- Run: `make test` or `pytest -q`\n- Coverage includes: parser, lint (E/W), resolution (catalog/gender), timeline, formatter.\n\n## Spec and Architecture\n- DSL spec: see `WODCraft_spec.md`.\n- Unified CLI: `src/wodcraft/cli.py` (entrypoint `wodc`).\n- Language core: `src/wodcraft/lang/core.py` (fa\u00e7ade over vNext core).\n- vNext core: `wodc_vnext/core.py` (modules/sessions/types), slated to be merged under `src/`.\n- Examples under `examples/` and modules under `modules/`. Movements catalog at `data/movements_catalog.json`.\n\n## Editor Support\n- VS Code/Windsurf extension (local): see `editor/wodcraft-vscode/` for syntax highlighting and snippets.\n- Quick dev run: `code --extensionDevelopmentPath=./editor/wodcraft-vscode .`\n\n## Examples (Language / Programming)\n- `examples/language/programming_plan.wod`: minimal \u201cCoach Programming\u201d block\n- `examples/language/team_realized_session.wod`: session with team + realized events for aggregation\n\n## Roadmap\n- Advanced formatter (indentation/blocks), macros and shorthands (`21-15-9`).\n- Versioned grammar and canonical `wodc fmt`.\n- Executable timer for gym use.\n\n## Contributing\n- Read `AGENTS.md` (conventions, structure, commands).\n- Open focused PRs with CLI examples and export artifacts.\n\n## \ud83d\udcdc License\n\n- **Code (DSL, tools, generators)** : [Apache 2.0](./LICENSE)  \n- **Content (docs, movement list, examples, images/videos)** : [CC-BY-SA 4.0](./LICENSE-docs)  \n\nIn summary:  \nYou can freely use WODCraft in your projects, including commercial ones, as long as you cite the source.  \nContent (movements, docs, etc.) must remain open and under the same CC-BY-SA license.\n\n---\n\n\u00a9 2025 Nicolas Caussin - caussin@aumana-consulting.com\n",
    "bugtrack_url": null,
    "license": "Apache License\n                                   Version 2.0, January 2004\n                                http://www.apache.org/licenses/\n        \n        TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n        \n        1. Definitions.\n           \"License\" shall mean the terms and conditions for use, reproduction,\n           and distribution as defined by Sections 1 through 9 of this document.\n           ...\n        \n           (texte complet : https://www.apache.org/licenses/LICENSE-2.0)\n        \n        END OF TERMS AND CONDITIONS\n        \n        Copyright 2025 Nicolas Caussin - caussin@aumana-consulting.com\n        \n        Licensed under the Apache License, Version 2.0 (the \"License\");\n        you may not use this file except in compliance with the License.\n        You may obtain a copy of the License at\n        \n            http://www.apache.org/licenses/LICENSE-2.0\n        \n        Unless required by applicable law or agreed to in writing, software\n        distributed under the License is distributed on an \"AS IS\" BASIS,\n        WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n        See the License for the specific language governing permissions and\n        limitations under the License.\n        ",
    "summary": "Write, lint, and compile CrossFit workouts (WODs) with a simple language and CLI. Export JSON/ICS, build a movements catalog, and get a quick timeline.",
    "version": "0.1.6",
    "project_urls": {
        "Homepage": "https://github.com/Nicolas78240/WODCraft",
        "Issues": "https://github.com/Nicolas78240/WODCraft/issues",
        "Repository": "https://github.com/Nicolas78240/WODCraft"
    },
    "split_keywords": [
        "crossfit",
        " dsl",
        " wod",
        " fitness",
        " parser",
        " lark"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6a2623b44fe8ec8ae9c5050ed144524f0d3eadbe085d301530291a6112861b8f",
                "md5": "7f29c81a35b6f5a421734f91f1359ae1",
                "sha256": "99411e4c3a700f9e93495a8f170717a561424aa8c6bb0219e79aae487cb0bf1c"
            },
            "downloads": -1,
            "filename": "wodcraft-0.1.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7f29c81a35b6f5a421734f91f1359ae1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 23156,
            "upload_time": "2025-09-13T08:32:49",
            "upload_time_iso_8601": "2025-09-13T08:32:49.405591Z",
            "url": "https://files.pythonhosted.org/packages/6a/26/23b44fe8ec8ae9c5050ed144524f0d3eadbe085d301530291a6112861b8f/wodcraft-0.1.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "266beb7bff476eb939ae5dd0bca3586ea7b03755a102c7be7c76fc977b3fe9c9",
                "md5": "626651797c3b9fb1d837d783e8c2aa18",
                "sha256": "753cd42e5a9f5883077e65f8449676d830b43cb20c7cba81411477fec2f6c067"
            },
            "downloads": -1,
            "filename": "wodcraft-0.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "626651797c3b9fb1d837d783e8c2aa18",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 27844,
            "upload_time": "2025-09-13T08:32:50",
            "upload_time_iso_8601": "2025-09-13T08:32:50.712912Z",
            "url": "https://files.pythonhosted.org/packages/26/6b/eb7bff476eb939ae5dd0bca3586ea7b03755a102c7be7c76fc977b3fe9c9/wodcraft-0.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-13 08:32:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Nicolas78240",
    "github_project": "WODCraft",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "lark",
            "specs": [
                [
                    ">=",
                    "1.1"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    ">=",
                    "7"
                ]
            ]
        },
        {
            "name": "black",
            "specs": [
                [
                    ">=",
                    "24"
                ]
            ]
        }
    ],
    "lcname": "wodcraft"
}
        
Elapsed time: 0.47078s