feat(db,list): add database management command and improve detailed view #19

Merged
umpire274 merged 3 commits from v0.5.1 into main 2025-11-12 23:39:23 +01:00
umpire274 commented 2025-11-12 23:37:02 +01:00 (Migrated from github.com)

🗄️ Database management

  • Introduced a new db command for database lifecycle control:
    • librius db --init → initializes or resets the current database.
    • librius db --reset → alias of --init.
    • librius db --copy -f <FILE> → copies the database defined in librius.yaml to a new file.
  • The database path is now automatically resolved from the configuration (`database: key).
  • Added localized messages for all database operations.
  • Fixed --copy flag behavior (no longer requires a value).

📚 Enhanced detailed list view

  • Fixed incorrect alphabetical sorting of fields in list --id <ID> --details.
  • Restored proper database field order:
    id, title, author, editor, year, isbn, language, pages, genre, summary, room, shelf, row, position, added_at.
  • Added localized column headers (Field / Value) in vertical table view.
  • Introduced new `--compact flag to hide empty fields in detailed mode.
  • --compact now requires `--details to ensure logical CLI usage.

🧩 General

  • Updated help messages and i18n translations.
  • Improved CLI consistency and visual output formatting.

Linked Issue / Milestone

Closes milestone v0.5.1 – Database management & improved list details view

**🗄️ Database management** - Introduced a new db command for database lifecycle control: - `librius db --init` → initializes or resets the current database. - `librius db --reset` → alias of `--init`. - `librius db --copy -f <FILE>` → copies the database defined in `librius.yaml` to a new file. - The database path is now automatically resolved from the configuration (`database: key). - Added localized messages for all database operations. - Fixed `--copy` flag behavior (no longer requires a value). **📚 Enhanced detailed list view** - Fixed incorrect alphabetical sorting of fields in `list --id <ID> --details`. - Restored proper database field order: `id, title, author, editor, year, isbn, language, pages, genre, summary, room, shelf, row, position, added_at`. - Added localized column headers (Field / Value) in vertical table view. - Introduced new `--compact flag to hide empty fields in detailed mode. - `--compact` now requires `--details to ensure logical CLI usage. **🧩 General** - Updated help messages and i18n translations. - Improved CLI consistency and visual output formatting. **Linked Issue / Milestone** Closes milestone **v0.5.1 – Database management & improved list details view**
Sign in to join this conversation.
No description provided.