Thanks to visit codestin.com
Credit goes to github.com

Skip to content

200ok-ch/keeptrack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

keeptrack

Keep track of changes with a clean versioned history

Overview

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.

Installation

bbin install io.github.200ok-ch/keeptrack

Usage

keeptrack [options] <URL>

Options

  • -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)

Handler Substitutions

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

Examples

Basic Usage

keeptrack https://api.example.com/data.json

With Custom Storage

keeptrack -s ~/my-tracking https://api.example.com/data.json

With Handler for Notifications

keeptrack --handler="echo 'New version: %n'" https://api.example.com/data.json

How It Works

  1. Downloads content from the specified URL
  2. Compares with the latest version (if exists)
  3. Creates timestamped file if content changed
  4. Updates symlink to point to latest version
  5. Executes custom handler if specified

File Naming

Files are stored with the format: {timestamp}-v{version}.json

Example: api-data-20250623T143052Z-v5.json

Dependencies

  • Babashka
  • curl
  • cmp
  • date

About

Keep track of changes without going crazy - clean versioned history

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published