master
Studywatch
This is a set of scripts.
- The cli client script tracks study sessions and syncs them with a CalDAV calendar.
- The apple shortcut client allows
- The server script reads from said CalDAV calendar and serves a nice-looking web UI and API endpoint.
Usage
Clients
cli script
A very simple implementation, but a good demonstration of the power of using CalDAV as a DB.
- Create an
.envfollowing the.env.examplelayout and fill in all fields. - Run as
./studywatch-cli <subject-name>(available subjects are also defined in.env). - Previous, failed syncs are stored in
./backlog.csvand will be reattempted first. - The new session will start and display a live timer. To stop it, send
SIGINT(Ctrl+C). - You will be asked if you want to sync the session (y|n).
Apple Shortcut
Requirement: Toolbox Pro app
Start Learning: Lets you select a subject and saves it, together with a timestamp, to a global (Toolbox Pro) variable.
Stop Learning: Creates a calendar event from the session stored in the global variable.
All with fancy menus, of course.
Server
The server is written in Python using Flask. It grabs the calendar events via CalDAV and renders a nice-looking UI.
Heads-up: the entire frontend is vibe-coded. I'm not much of a web dev. The backend is written by me but isn't the greatest code quality. I just needed it to work, and it does work great!
Install
- Copy
server/docker-compose.yamlandserver/.env.example. - Rename
.env.exampleto.env, make sure it's in the same directory as the compose file, and fill in all fields. - Run
docker compose up -d. - Open at
0.0.0.0:5000.
Screenshots
Description
Client and server scripts to track study sessions, store them in a CalDAV calendar and render out a nice web dashboard.
461 KiB
Languages
Python
60.7%
CSS
17.1%
JavaScript
12.9%
HTML
8.1%
Dockerfile
1.2%

