Add multi-project sync wrapper and timer docs

This commit is contained in:
2026-09-14 14:56:04 +02:00
parent 26041efd8d
commit 83de749b87
2 changed files with 116 additions and 0 deletions
+25
View File
@@ -109,6 +109,31 @@ tmux new -s zed-hours -d 'python3 tools/time_tracking/zed_tracker.py --project-r
---
## Automatic sync (systemd user timer)
`sync_all.py` syncs every configured project in one run. Configuration lives
in `~/.config/zed-hours-sync/`:
| File | Purpose |
|---|---|
| `env` | `ZED_HOURS_SERVER_URL`, `ZED_HOURS_SERVER_TOKEN`, `ZED_HOURS_DEVICE_ID` (keep mode 600) |
| `projects.txt` | One project per line: `PATH [SLUG]`; slug defaults to the directory name |
A systemd user pair drives it:
- `zed-hours-sync.service` (oneshot; runs `sync_all.py` with the env file)
- `zed-hours-sync.timer` (every 15 minutes, `Persistent=true` to catch up after sleep)
Useful commands:
```sh
systemctl --user start zed-hours-sync.service # run a sync now
systemctl --user list-timers zed-hours-sync.timer # next scheduled run
journalctl --user -u zed-hours-sync.service -f # live logs
```
---
## Generating a report
```bash