Replace the committed channels/<slug>.json files as the runtime source of truth with a local SQLite database at the repo root (clipwright.db), overridable via CLIPWRIGHT_DB. Existing JSON profiles are imported once on first bootstrap, then the store is authoritative. - add clipwright/storage/channel_profiles.py (stdlib sqlite3, WAL + lock) - add Profile/TitleRules/ThumbnailRules.to_dict() for round-tripping - load_profile/list_profiles read the store; channels_dir stays a file seam - /api/channels CRUD plus import/export endpoints - untrack channels/*.json, ignore the DB files - seed a temp DB in tests/conftest.py
6 lines
251 B
Python
6 lines
251 B
Python
"""Local persistence helpers for the Clipwright backend.
|
|
|
|
Right now this package holds the SQLite-backed channel profile store; future
|
|
runtime state can follow the same shape (stdlib ``sqlite3``, one file at the
|
|
repo root, lazily created schema).
|
|
"""
|