A CLI for tracking skateboarding sessions
- FastAPI API
- htmx dashboard
- Typer CLI
- Text formatting with rich
- Generates plots with matplotlib
- Stores data in a SQLite database
- Imports from and exports to CSV files
I try to skateboard for fun and exercise as often as possible. And I like to keep track of what I work on and also how long my gear lasts. I've been keeping this data in a spreadsheet since 2024.
Also, I used to be comfortable with Python. I even used it professionally around 2014 to 2015. Since then I've barely used Python at all. I decided to work on this project with the goal of re-learning Python.
In an effort to actually learn Python I'm writing everything by hand. Also, I've become interested in tmux and neovim, so I'm using those tools as well.
- Python 3.14
- uv
uv run skatelog addlogs a new sessionuv run skatelog listlists sessionsuv run skatelog show 2026-05-22shows the session on the specified dateuv run skatelog list-trickslists tricksuv run skatelog list-disciplineslists all known disciplines and how many times they were traineduv run skatelog list-locationslists all known locations and how many times they were visiteduv run skatelog list-shoeslists all known shoes and how many times they were wornuv run skatelog list-boardslists all known boards and how many times there were skateduv run skatelog import /path/to/import.csvimports data from a CSV fileuv run skatelog export /path/to/export.csvexports data to a CSV fileuv run skatelog delete 2026-05-22deletes the session on the specified dateuv run skatelog delete-trick 100deletes the trick with the specified IDuv run skatelog streakfinds streaks of days skated
uv run fastapi dev or uv run fastapi run
- Initial setup:
make init - Check code and run tests:
make
make runs the following:
- pyright:
uv run pyright - ty:
uv check - ruff check:
uv run ruff check . - ruff format:
uv run ruff format . - pytest:
uv run py.test
- The project was created using
uv init --package skatelog ruff checkconfiguration came from ruff's docs ["a configuration that enables some of the most popular rules (without being too pedantic)"]- Some of the pre-commit configuration was generated by
pre-commit sample-config(see pre-commit's docs)
I included the disciplines that are relevant to my skateboarding. If you'd like to track other activities, you can! For example, you may want to track specific tricks like noseslide, crooked grind, etc. It requires some code changes, but it's reasonably simple.
- If you've recorded any sessions, use the
exportcommand to export your data - Delete your SQLite database (delete the file at
$HOME/.skatelog/skatelog.db) - Add an entry to the
Disciplineenum in src/skatelog/models.py - Add your new Discipline to
_DISCIPLINE_COLUMNSin src/skatelog/exporter.py - Add your new Discipline to
_DISCIPLINE_COLUMNSin src/skatelog/importer.py - Run the
importcommand to restore your data from step 1