Keep track of changes with a clean versioned history
keeptrack is a Babashka script that monitors URLs for changes and
maintains a versioned history of content. When content changes, it
creates timestamped versions and can optionally trigger custom
handlers.
bbin install io.github.200ok-ch/keeptrackkeeptrack [options] <URL>-d, --debug- Print debug messages-h, --handler=COMMAND- Command to execute when new version is created-s, --storage=PATH- Storage directory (default:~/.keeptrack)-t, --tempdir=PATH- Temporary files directory (default:/tmp/keeptrack)
When using the --handler option, you can use these placeholders:
%o- Path to the old file%n- Path to the new file%l- Previous version%v- New version
keeptrack https://api.example.com/data.jsonkeeptrack -s ~/my-tracking https://api.example.com/data.jsonkeeptrack --handler="echo 'New version: %n'" https://api.example.com/data.json- Downloads content from the specified URL
- Compares with the latest version (if exists)
- Creates timestamped file if content changed
- Updates symlink to point to latest version
- Executes custom handler if specified
Files are stored with the format: {timestamp}-v{version}.json
Example: api-data-20250623T143052Z-v5.json
- Babashka
- curl
- cmp
- date