Commit Graph
3 Commits
Author SHA1 Message Date
arnefandCopilot ae46e8f5c0 Replace config file with folder-based mapping
Mappings between local playlist folders and Kreativ-Tonies are now
expressed purely through the filesystem instead of a YAML config:

  <root>/<household_id>/<freier_name> [id=<tonie_id>]/*.mp3

- internal/library: discovers tonie folders from this structure
  (Discover/Filter), and scaffolds it automatically from the
  TonieCloud account (Scaffold), leaving already-existing folders
  (matched by tonie id) untouched
- internal/syncer: decoupled from the removed config package via a
  plain Target{TonieID, Folder, Prune} struct
- cmd/toni-sync: new `init --root PATH` command to scaffold the
  library; `sync [FILTER] --root PATH` now discovers targets from the
  folder tree instead of a config file; removed the `config` command
  group entirely
- Unit tests for folder discovery, filtering, and scaffolding

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-14 12:02:54 +02:00
arnefandCopilot d003c32433 Rewrite toni-sync in Go
- Replace the Python implementation with a Go module compiling to a
  single static binary (no Python/pip runtime dependency)
- internal/tonieapi: minimal, dependency-light HTTP client for the
  TonieCloud REST API (login, households, creative tonies, file
  upload via presigned S3 request, chapter add/sort/clear)
- internal/config: YAML-based mapping of local playlist folders to
  Kreativ-Tonies, credentials never stored
- internal/syncer: diff/apply logic (upload new tracks, prune removed
  chapters, reorder to match local file order), built against a
  TonieClient interface for testability
- cmd/toni-sync: Cobra CLI with `tonies list`, `config add/list/remove`,
  `sync [NAME|--all] [--dry-run]`
- Unit tests for config persistence and syncer plan/apply logic

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-14 06:52:11 +02:00
arnefandCopilot 4860edf886 Initial toni-sync CLI: sync local playlist folders to Kreativ-Tonies
- Config commands (config add/list/remove) to map local audio folders
  to Kreativ-Tonies via TonieCloud household/tonie ids
- tonies list command to look up household/tonie ids
- sync command: diff-based upload of new tracks, pruning of removed
  chapters, and reordering to match local file order (via tonie-api)
- Credentials resolved via env vars/CLI flags/prompt, never stored
- Unit tests for config persistence and sync planning/apply logic

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-13 22:41:00 +02:00