Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@

All notable changes to this project will be documented in this file.

## [0.4.6] - 2025-11-12

### đź”§ Changed

- **Reorganized command index** in the CLI help output for better logical grouping and readability.
Commands are now displayed in a clearer order, following a structured hierarchy (Book commands, App commands, etc.).

- **Localized help section titles (`help_heading`)** across the entire CLI, including:
- “Global options”
- “List-specific options”
- “Import-specific options”
- “Export-specific options”
- and other command-related help blocks

- Improved overall **consistency and clarity** of command descriptions and section headings in both English and Italian.

### đź§© Internal

- Updated `display_order` values to reflect the new command hierarchy.
- Refined `cli.rs` layout for easier maintenance of localized help headings.

---

## [0.4.5] - 2025-11-11

### Added
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "librius"
version = "0.4.5"
version = "0.4.6"
edition = "2024"
authors = ["Alessandro Maestri <umpire274@gmail.com>"]
description = "A personal library manager CLI written in Rust."
Expand Down
39 changes: 18 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,20 @@ and import/export support.

---

### ✨ New in v0.4.5

**🔍 Full-text book search**

- Introduced the new `search` command:
```bash
librius search <query> [--short]
```
#### Example usage:
```bash
$ librius search "dune"
$ librius search "frank herbert" --short
```
- Performs full-text lookup across **title, author, editor, genre, and language** fields.
- Supports both **compact** (`--short`) and **full** table views.
- Uses the same localized message system (`tr()`) as the rest of the CLI.
- Unified output style with `print_info`, `print_ok`, and `print_warn` for consistent visual feedback.
### ✨ New in v0.4.6

**đź”§ CLI help reorganization and localization**

- Reorganized the **command index** in the main help output to provide a clearer, more intuitive structure.
- Commands are now grouped into:
- 📚 **Book commands** — `list`, `search`, `add`, `edit`, `del`
- ⚙️ **App commands** — `config`, `backup`, `export`, `import`
- ❓ **Other commands** — `help`
- Added **full localization** to all help section titles (`help_heading`), ensuring the help text is completely
translated and consistent between English and Italian.
- Improved the **readability and logical flow** of command listings and global options.
- Updated `display_order` values to match the new command grouping.
- Refactored `cli.rs` to simplify future maintenance and localization.

---

Expand Down Expand Up @@ -80,16 +77,16 @@ cargo install rtimelogger
|:-------------------------|:---------------------------------|:---------------------------------------------------------------------------------------------------------------|
| **List** | `librius list` | Display all books stored in the local database, in full or compact view |
| **Search** | `librius search <query>` | Full-text search across title, author, editor, genre, and language fields; supports `--short` for compact view |
| **Add book** | `librius add book --isbn <ISBN>` | Add new books using ISBN lookup via Google Books API |
| **Edit book** | `librius edit book <ID/ISBN>` | Edit existing records by ID or ISBN; dynamic field generation, language conversion, and plural-aware messages |
| **Delete book** | `del <ID/ISBN>` | Delete books by ID or ISBN, with interactive confirmation, `--force` flag, and logged deletions |
| **Config management** | `librius config` | Manage YAML configuration via `--print`, `--init`, `--edit`, `--editor` |
| **Backup** | `librius backup` | Create plain or compressed database backups (`.sqlite`, `.zip`, `.tar.gz`) |
| **Export** | `librius export` | Export data in CSV, JSON, or XLSX format |
| **Import** | `librius import` | Import data from CSV or JSON files (duplicate-safe via ISBN) |
| **Database migrations** | *(automatic)* | Automatic schema upgrades and integrity checks at startup |
| **Logging system** | *(internal)* | Records all operations and migrations in an internal log table |
| **Multilanguage (i18n)** | `librius --lang <code>` | Fully localized CLI (commands, help, messages); `--lang` flag and config key |
| **Add book** | `librius add book --isbn <ISBN>` | Add new books using ISBN lookup via Google Books API |
| **Edit book** | `librius edit book <ID/ISBN>` | Edit existing records by ID or ISBN; dynamic field generation, language conversion, and plural-aware messages |
| **Delete book** | `del <ID/ISBN>` | Delete books by ID or ISBN, with interactive confirmation, `--force` flag, and logged deletions |
| **Dynamic help system** | `librius help <command>` | Ordered and grouped help output using `display_order()` and `next_help_heading()` |

---
Expand Down Expand Up @@ -501,7 +498,7 @@ The latest migration adds a unique index on `isbn` to guarantee
that duplicate imports are ignored safely.

```sqlite
CREATE UNIQUE INDEX IF NOT EXISTS idx_books_isbn ON books(isbn);
CREATE UNIQUE INDEX IF NOT EXISTS idx_books_isbn ON books (isbn);
```

- On first launch → creates books table.
Expand Down
Loading