Skip to content

MikeCoats/gregorian

Repository files navigation

The Greg or Ian Calendar

gregorian.mikecoats.xyz

A web app with an integrated iCal feed so you will always know whether today is a Greg or Ian day!

A screenshot of the Greg or Ian Calendar web app. In the screenshot, it's Thursday 11th January 2024, making it an 'Ian' day.

For developers

Install the required packages

$ python -m venv .venv
$ source .venv/bin/activate
$ pip install -r dev-requirements.txt

Debug with Visual Studio Code

Install Microsoft's Python extension, if you haven't already. Then launch vscode from within the project's activated virtualenv.

$ source .venv/bin/activate
$ code .

Add the following snippet to your .vscode/launch.json's .configuration array.

{
    "name": "Debug Greg or Ian",
    "type": "python",
    "request": "launch",
    "module": "uvicorn",
    "args": [
        "main:app",
        "--reload",
        "--host", "0.0.0.0",
        "--port", "8001"
    ],
    "jinja": true,
    "justMyCode": true
}

Linting the project

$ black main.py

$ isort main.py

$ flake8 main.py

$ pylint main.py

Deploy the project

$ ansible-playbook -i inventory.yaml gregorian.playbook.yaml

Credits

Inspiration

The Gregorian calendar by Natasha Jay .

A screenshot of Natasha Jay's Mastodon post laying out the rules for the Greg or Ian Calendar.

Icon

Help calendar by Khomsun Chaiwong made available under CC BY 3.0 .

The Greg or Ian Calendar icon! Otherwise known as 'Help calendar' by Khomsun Chaiwong.