Conversation
…integration Implemented new subcommand add book --isbn <ISBN> for automatic metadata retrieval. Integrated Google Books API to fetch title, author, publisher, year, and language. Added ISO 639-1 → full language name conversion utility. Localized all messages and help texts (English / Italian). Refactored Default trait derivations for cleaner structs. Improved error handling and field mapping for API responses.
… output - Introduced new utility module utils/isbn.rs with normalize_isbn() function. - Added full ISBN-10 and ISBN-13 validation with bidirectional conversion. - Implemented localized error messages via i18n for invalid ISBNs. - Integrated ISBN normalization in the list command for readable formatting. - Added comprehensive unit tests and doctests for the new helper.
- Finalized version 0.4.0 with new `edit book` command. - Added dynamic field generation via `EDITABLE_FIELDS` and automatic language conversion. - Introduced ordered and grouped CLI help using `display_order()` and `next_help_heading()`. - Added localized detailed field update messages showing old → new values. - Implemented plural-aware summary messages for all languages (e.g., "campo"/"campi"). - Refactored CLI structure for consistency, readability, and full i18n support.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[0.4.0] - 2025-10-18
Added
New command
add book:New command
edit book:title,author,editor,year,language,pages,genre,summary,room,shelf,row,position), excluding ID and ISBN."en" → "English") usinglang_code_to_name().EDITABLE_FIELDSdefinition infields.rs.display_order()andnext_help_heading():✅ Field "year" updated successfully (2018 → 2020)."✅ Book 9788820382698 successfully updated (2 fields modified).""✅ Libro 9788820382698 aggiornato correttamente (2 campi modificati)."Integrated dynamic i18n support for all CLI help messages (
add,edit,book,isbn).Added automatic language name resolution (e.g.,
"it"→"Italian").New utility module
utils/lang.rsfor ISO 639-1 to language name conversion.New utility module
utils/isbn.rs:normalize_isbn()helper for validation and bidirectional formatting.Localized console messages for book lookup, edition, and insertion results.
Changed
add.rs,add_book.rs, andedit_book.rsundersrc/commands/.addandeditcommands.impl Defaultblocks with idiomatic#[derive(Default)].listcommand usingnormalize_isbn()for readable hyphenated output.cli.rs) with ordered, grouped, and localized help output for all commands."edit.book.updated.one"and"edit.book.updated.many"inen.json/it.json.Fixed
volumeInfo,publishedDate,pageCount)."Book already present in your library").