Worklog Automation

Automation

Three scripts automate worklog maintenance. All are hooked into Makefile targets.

Scripts

Script Purpose Hooked Into

scripts/update-carryover-days.sh

Reads Origin dates from carryover.adoc, calculates (today - origin) days, updates Days column in-place

make new-day

scripts/sync-worklog-nav.sh

Scans worklog files for a month, finds insertion point in partials/nav/chronicle-YYYY.adoc, adds missing entries (newest first)

make push

scripts/update-monthly-index.sh

Extracts :description: from each worklog, rebuilds == Worklogs section in monthly index.adoc

make push

scripts/audit-worklogs.sh

Read-only audit: compares files vs nav vs index, reports drift

Manual

Makefile Targets

Target Behavior

make new-day

Runs update-days → creates worklog from template

make push

Runs sync-navupdate-indexgit add -A → commit → push all remotes

make update-days

Standalone: update carryover Days column

make sync-nav

Standalone: sync nav entries for current month

make update-index

Standalone: update monthly index for current month

Daily Workflow

1. make new-day          # Auto-updates Days, creates worklog
2. Edit worklog          # Fill in summary, sessions, notes
3. Update trackers       # Move completed items, add new ones
4. make push             # Auto-syncs nav + index, commits, pushes

Script Design Principles

  • Idempotent — running twice produces the same result

  • Non-destructive — scripts back up files before modification

  • Informative — colored output reports what changed (or "already current")

  • Standalone — each script works independently via ./scripts/<name>.sh [year] [month]