Skip to content

Add multi-file fortune support + smarter cache repetition (v0.5.5) #75

Merged
umpire274 merged 2 commits intomainfrom
v0.5.5
Nov 6, 2025
Merged

Add multi-file fortune support + smarter cache repetition (v0.5.5) #75
umpire274 merged 2 commits intomainfrom
v0.5.5

Conversation

@umpire274
Copy link
Owner

[0.5.5] - 2025-02-07

Added

  • Support for multiple fortune files via --file <PATH> (repeatable).
  • New configuration key fortune_files (list).
    When populated, it takes priority over default_file.
  • Automatic config migration: if fortune_files is missing or empty,
    it is initialized with the value of default_file.
  • Intelligent no-repeat mechanism:
    rfortune avoids showing the same quote twice in a row from the same file.
  • Unified JSON-based quote cache shared across multiple fortune files.

Changed

  • files_fortune is now deprecated and replaced by fortune_files.
    Existing configurations remain compatible via serde(alias).

Removed

  • Deprecated single-file print_random() function.

- Added --file <PATH> (repeatable) to load multiple quote sources
- Added new config key `fortune_files` with automatic migration
- Implemented shared JSON cache storage
- Added per-file no-repeat quote selection logic
@umpire274 umpire274 self-assigned this Nov 6, 2025
@umpire274 umpire274 added the enhancement New feature or request label Nov 6, 2025
…no-repeat behavior on Linux

- save_last_cache now uses canonical_key() just like load_last_cache
- prevents mismatched cache keys on platforms where canonicalize() changes path representation
- resolves CI failure on Linux for test_no_repeat_on_same_file
@umpire274 umpire274 merged commit ce803c0 into main Nov 6, 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.

1 participant