Skip to content

nanreh/calendar-hack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

fee82c4 · Feb 22, 2025
Feb 19, 2025
Dec 17, 2022
Feb 22, 2025
Feb 22, 2025
Jan 25, 2025
Jan 6, 2025
Jan 25, 2025
Jan 6, 2025
Oct 4, 2020
Jan 6, 2025
Jan 6, 2025
Jan 6, 2025
Jan 6, 2025
Jan 6, 2025
Feb 19, 2025
Jan 6, 2025
Jan 6, 2025
Jan 6, 2025
Jan 25, 2025
Jan 25, 2025

Repository files navigation

Calendar Hack Project Info

Calendar Hack is a web application for runners who train for races. It renders a training program on a calendar and provides some basic editing features. It also provides for downloading the result as an iCal file which can be imported into any calendar application worth using.

The project is hosted at defy.org/hacks/calendarhack

More project details are available on the About page

Contributing

If you have a bugfix, a new feature, a new training plan, a UX/UI fix, or other contribution, please send a PR. Feel free to create a GitHub issue if you want to call something out.

Running Locally

Calendar Hack is a React application. Using yarn, you can run it locally with: yarn dev

The other standard scripts exist also: yarn test, yarn build, etc.

Plans

Training plans are represented as YAML files that are easy to create and edit. They can be found in plans/yaml.

Plans can be validated against a JSON schema (public/schema/plan-schema.json) as follows:

# Install ajv
npm install -g ajv-cli

# Run the validator with yarn
yarn run validatePlans

Converting new plans

If you are adding a new plan or modifying an existing one, you should work with the YAML version of the plan.

A simple program then converts the YAML plans to JSON for the application to consume:

python3 -m venv my_env
source ./venv/bin/activate
pip install pyyaml
python3 ./bin/convertPlans

TODO: automate this step