Skip to content

Repository files navigation

skatelog

A CLI for tracking skateboarding sessions

Features

Background

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.

Dependencies

  • Python 3.14
  • uv

Usage

CLI

  • uv run skatelog add logs a new session
  • uv run skatelog list lists sessions
  • uv run skatelog show 2026-05-22 shows the session on the specified date
  • uv run skatelog list-tricks lists tricks
  • uv run skatelog list-disciplines lists all known disciplines and how many times they were trained
  • uv run skatelog list-locations lists all known locations and how many times they were visited
  • uv run skatelog list-shoes lists all known shoes and how many times they were worn
  • uv run skatelog list-boards lists all known boards and how many times there were skated
  • uv run skatelog import /path/to/import.csv imports data from a CSV file
  • uv run skatelog export /path/to/export.csv exports data to a CSV file
  • uv run skatelog delete 2026-05-22 deletes the session on the specified date
  • uv run skatelog delete-trick 100 deletes the trick with the specified ID
  • uv run skatelog streak finds streaks of days skated

API and dashboard

uv run fastapi dev or uv run fastapi run

Development

  • 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

A note to my future self about setting this up

  • The project was created using uv init --package skatelog
  • ruff check configuration 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)

Guides

Adding a discipline

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.

  1. If you've recorded any sessions, use the export command to export your data
  2. Delete your SQLite database (delete the file at $HOME/.skatelog/skatelog.db)
  3. Add an entry to the Discipline enum in src/skatelog/models.py
  4. Add your new Discipline to _DISCIPLINE_COLUMNS in src/skatelog/exporter.py
  5. Add your new Discipline to _DISCIPLINE_COLUMNS in src/skatelog/importer.py
  6. Run the import command to restore your data from step 1

About

A CLI for tracking skateboarding sessions

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages