Skip to content

Conversation

@umpire274
Copy link
Owner

✨ Summary

This PR introduces the new search command to Librius and includes several internal refinements for code clarity and Clippy compliance.


🔍 New Features

  • Added the search command:
    librius search <query> [--short]
  • Performs full-text lookup across title, author, editor, genre, and language fields.
  • Supports both compact (--short) and full table views.
  • Integrated with the existing i18n system (tr() / tr_s()) for localized messages.
  • Uses unified output styling (print_info, print_ok, print_warn) for consistent CLI feedback.

📦 Version

Release: v0.4.5
Date: 2025-11-11

…mpliance

- Implemented new `search` command (`librius search <query> [--short]`)
- Added database helper `search_books()` in `db/search.rs`
- Integrated localized CLI help and messages (`search_about`, `search.no_results`, etc.)
- Added new output handlers using `print_info`, `print_warn`, and `print_ok` for consistent CLI feedback

- Refactored `handle_search()` logic for i18n integration and unified output style
- Renamed command source file to `search_book.rs` to avoid ambiguous glob re-exports
- Replaced redundant closure `|row| Book::from_row(row)` with direct function reference `Book::from_row`
  (Clippy compliance under `-D warnings`)
@umpire274 umpire274 self-assigned this Nov 11, 2025
@umpire274 umpire274 added the enhancement New feature or request label Nov 11, 2025
@umpire274 umpire274 merged commit 7bb3f72 into main Nov 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants