Releases: umpire274/rFortune
Releases · umpire274/rFortune
v0.5.6
Changelog
[0.5.6] - 2025-11-17
Added
- Official Debian (.deb) package generation using
cargo-deb.
A.debpackage is now automatically built, signed, and included in every release.
This update addresses Issue #79 — “Provide a .deb package”.
Changed
- Updated CI pipeline to integrate
.debproduction on Linux (ubuntu-latest). - Improved artifact handling and release asset organization across platforms.
Fixed
- Ensured consistent SHA256 and GPG signature generation for all package formats.
[0.5.5] - 2025-11-06
Added
- Support for multiple fortune files via the repeatable
--file <PATH>option.
Example:rfortune --file ~/fortunes/dev --file ~/fortunes/humor
- New configuration key
fortune_files(list). When populated, it takes priority over default_file. - Automatic configuration migration: if
fortune_filesis missing or empty, it is initialized with the value of
default_file. - Unified JSON-based quote cache shared across multiple fortune files.
- Intelligent no-repeat mechanism: prevents showing the same quote twice in a row
from the same fortune file. - Informational log message showing the active configuration directory during startup.
- Advisory file locking using the
fs2crate to protect concurrent access to the shared JSON cache (
last_quotes.json). - A dedicated integration test
tests/cache_tests.rsto verify save/load roundtrip for the cache using a sandboxed
application directory.
Changed
- The function
app_dir()now provides a consistent and reliable fallback whendirs::data_dir()returnsNone(e.g.
in
CI or headless environments).- macOS →
$HOME/Library/Application Support/rfortune - Linux →
$HOME/.local/share/rfortune
- macOS →
- Improved cross-platform consistency for configuration and cache directories.
- Fixed inconsistent cache path resolution caused by incorrect
app_dir()usage on Linux/macOS. - Extracted duplicated cache directory creation logic into a new helper function
ensure_cache_dir(), now used by both
save_last_cache()andsave_last_cache_json()for more reliable cache writes. - Implemented atomic writes for the JSON cache store: writes now go to a temporary file in the same directory and are
replaced via rename. On Windows the code attempts a remove+rename fallback to cover older semantics that may prevent
overwrites. - Introduced
open_and_lock()helper to centralize file opening and locking logic (DRY). - Switched internal cache APIs to use
anyhow::Resultfor richer error context. - Unified cache path resolution to consistently use
config::app_dir(). - Added
fs2andanyhowdependencies inCargo.toml.
Fixed
- Removed unused helper
save_last_cache_jsonand cleaned up duplicate cache initialization logic. - Ensure the cache write path releases the file lock and closes the handle before attempting rename/remove (fixes
Windows "file in use" errors during replacement). - Make
app_dir()test override re-entrant so tests can set a sandboxed app directory per test run (replaced
OnceLock<PathBuf>withOnceLock<Mutex<Option<PathBuf>>>). - Make tests robust for parallel CI runs by using unique sandbox directories (timestamp + pid) and ensuring the fortune
source file exists before writing cache (fixes intermittent test failures on CI/Windows).
Removed
- Deprecated single-file
print_random()function replaced by multi-file logic.
[0.5.3] - 2025-11-05
Fixed
- Added interactive check when rFortune is launched without an existing configuration directory:
- If run in an interactive terminal, the user is asked to confirm initialization (
Initialize rFortune now? [Y/n]). - If run in a non-interactive context (script, CI, etc.), initialization proceeds automatically.
- If run in an interactive terminal, the user is asked to confirm initialization (
- Prevents unintended directory creation and improves transparency during the first launch.
Changed
- Initialization flow is now clearer and reports actions through
ConsoleLogmessages.
[0.5.2] - 2025-11-04
Added
- New
ConsoleLogutility for rich, colorized console output with Unicode symbols:- ℹ
info()– Informational messages - ✅
ok()– Successful operations ⚠️ warn()– Warnings and recoverable issues- ❌
ko()– Errors and critical failures
- ℹ
- Integrated
ConsoleLogthroughout configuration, cache, and file management commands for consistent CLI feedback. - New subcommand
config editfor editing the configuration file directly from the terminal:rfortune config edit→ opensrfortune.confusing the system’s default text editor.rfortune config edit --editor <name|path>→ opens it with a specific editor (e.g.vi,nano,code).
- Automatic editor detection logic:
- Checks
$VISUALand$EDITORenvironment variables. - Falls back to
nanoon macOS/Linux andnotepadon Windows.
- Checks
- Integrated colored console messages (
ConsoleLog) for clear feedback during editing.
Changed
- Configuration filename renamed from
config.yaml→rfortune.conffor better clarity and platform
consistency. - Updated initialization logic to automatically migrate existing
config.yamlto the new format (backup saved as
config.yaml.bak). - Unified editor behavior across platforms for a consistent CLI experience.
- Improved user feedback when creating or editing the configuration file.
Fixed
- Improved user feedback during
config init,file init, andcache clearoperations to prevent duplicate or missing
log messages.
[0.5.1] - 2025-10-27
Added
- Embedded Windows application icon (
res/rFortune.ico) directly into the executable.- Implemented using the
winresbuild dependency. - The icon is now visible in Windows Explorer and taskbar.
- Implemented using the
- New
res/directory introduced for graphical assets (SVG, PNG, ICO).
Changed
- Build process updated to automatically compile and embed Windows resources during
cargo build --release.
Notes
- The
.resfile generated during build is temporary and not stored in the repository.
[v0.5.0] - 2025-10-04
🔧 Refactoring
- Split CLI definition into a dedicated
cli.rsmodule - Added a new
commands.rsmodule to handle subcommand actions (config init,file init,cache clear) - Extracted configuration logic from
utils.rsinto a newconfig.rsmodule - Simplified
main.rsto only parse CLI input and dispatch commands
✨ CLI Improvements
- Introduced subcommands:
config init→ initialize the configuration filefile init→ create a sample default fortune file (rfortune.dat)cache clear→ clear the cache directory
- Enhanced
--helpoutput with a detailedlong_aboutdescription and usage examples
✅ Misc
- Clearer module boundaries (
cli,commands,config,utils,loader) - Improved maintainability and readability of the codebase
[v0.3.0] - 2025-07-30
🔧 Refactoring
- Removed
fortune.rsand consolidated logic into newutils.rs - Updated
main.rsandlib.rsto userfortunecrate structure consistently
🧪 Unit Testing
- Added unit tests for
loadermodule (parsing.datfiles) - Added unit tests for
utilsmodule, includingrandom_quoteandprint_random - Fixed the signature of
print_random()to accept file path for cache handling
💾 Cache Support
- Implemented cache system to avoid repeating the same fortune twice
- Cache is stored in user-specific system path (
$XDG_DATA_HOME/rfortune/cache/or%APPDATA%\rfortune\cache\) - Added tests for reading/writing cache and ensuring uniqueness of quotes
- Introduced
--clear-cacheflag to manually delete the entire cache directory
✅ Misc
- Ensured full cross-platform compatibility (Linux, macOS, Windows)
- Cleaned up unused code and improved module boundaries
[v0.2.2] - 2025-07-29
Changed
- Updated the
README.mdin thehomebrew-rfortunetap repository to include installation instructions via Homebrew.
Notes
- No changes to the binary or functionality of
rfortuneitself.
[v0.2.1] - 2025-07-29
Added
- Support for publishing
rfortuneto crates.io - Updated
Cargo.tomlwith metadata required by crates.io:- Package description, authors, license, keywords, categories
- Repository and homepage URLs
- Included files for packaging
Notes
- This version does not introduce new features or changes to functionality.
- Users can now install
rfortunedirectly via:cargo install rfortune
[v0.2.0] - 2025-07-27
✨ Added
- Support for
--initflag to automatically create the default directory and a samplerfortunes.datfile. - Cross-platform default path detection:
- Linux/macOS:
/usr/local/share/rfortune/rfortunes.dat - Windows:
%APPDATA%\rfortune\rfortunes.dator fallback toC:\Users\Public\rfortune\rfortunes.dat
- Linux/macOS:
- Basic CLI argument parsing via
clap:--file <path>to specify a custom.datfile--version,--helpstandard output
- New
README.mdwith full documentation of features, usage, installation, and init. - Modular refactoring of codebase:
main.rs: CLI and application entry pointloader.rs: reads and parses.datfilesfortune.rs: selects a random fortune
🛠 Changed
- Default fortune file format now expects phrases separated by
%on their own line (BSD style). - Improved error messages and file validation.
v0.5.3
Changelog
[0.5.3] - 2025-11-05
Fixed
- Added interactive check when rFortune is launched without an existing configuration directory:
- If run in an interactive terminal, the user is asked to confirm initialization (
Initialize rFortune now? [Y/n]). - If run in a non-interactive context (script, CI, etc.), initialization proceeds automatically.
- If run in an interactive terminal, the user is asked to confirm initialization (
- Prevents unintended directory creation and improves transparency during the first launch.
Changed
- Initialization flow is now clearer and reports actions through
ConsoleLogmessages.
[0.5.2] - 2025-11-04
Added
- New
ConsoleLogutility for rich, colorized console output with Unicode symbols:- ℹ
info()– Informational messages - ✅
ok()– Successful operations ⚠️ warn()– Warnings and recoverable issues- ❌
ko()– Errors and critical failures
- ℹ
- Integrated
ConsoleLogthroughout configuration, cache, and file management commands for consistent CLI feedback. - New subcommand
config editfor editing the configuration file directly from the terminal:rfortune config edit→ opensrfortune.confusing the system’s default text editor.rfortune config edit --editor <name|path>→ opens it with a specific editor (e.g.vi,nano,code).
- Automatic editor detection logic:
- Checks
$VISUALand$EDITORenvironment variables. - Falls back to
nanoon macOS/Linux andnotepadon Windows.
- Checks
- Integrated colored console messages (
ConsoleLog) for clear feedback during editing.
Changed
- Configuration filename renamed from
config.yaml→rfortune.conffor better clarity and platform
consistency. - Updated initialization logic to automatically migrate existing
config.yamlto the new format (backup saved as
config.yaml.bak). - Unified editor behavior across platforms for a consistent CLI experience.
- Improved user feedback when creating or editing the configuration file.
Fixed
- Improved user feedback during
config init,file init, andcache clearoperations to prevent duplicate or missing
log messages.
[0.5.1] - 2025-10-27
Added
- Embedded Windows application icon (
res/rFortune.ico) directly into the executable.- Implemented using the
winresbuild dependency. - The icon is now visible in Windows Explorer and taskbar.
- Implemented using the
- New
res/directory introduced for graphical assets (SVG, PNG, ICO).
Changed
- Build process updated to automatically compile and embed Windows resources during
cargo build --release.
Notes
- The
.resfile generated during build is temporary and not stored in the repository.
[v0.5.0] - 2025-10-04
🔧 Refactoring
- Split CLI definition into a dedicated
cli.rsmodule - Added a new
commands.rsmodule to handle subcommand actions (config init,file init,cache clear) - Extracted configuration logic from
utils.rsinto a newconfig.rsmodule - Simplified
main.rsto only parse CLI input and dispatch commands
✨ CLI Improvements
- Introduced subcommands:
config init→ initialize the configuration filefile init→ create a sample default fortune file (rfortune.dat)cache clear→ clear the cache directory
- Enhanced
--helpoutput with a detailedlong_aboutdescription and usage examples
✅ Misc
- Clearer module boundaries (
cli,commands,config,utils,loader) - Improved maintainability and readability of the codebase
[v0.3.0] - 2025-07-30
🔧 Refactoring
- Removed
fortune.rsand consolidated logic into newutils.rs - Updated
main.rsandlib.rsto userfortunecrate structure consistently
🧪 Unit Testing
- Added unit tests for
loadermodule (parsing.datfiles) - Added unit tests for
utilsmodule, includingrandom_quoteandprint_random - Fixed the signature of
print_random()to accept file path for cache handling
💾 Cache Support
- Implemented cache system to avoid repeating the same fortune twice
- Cache is stored in user-specific system path (
$XDG_DATA_HOME/rfortune/cache/or%APPDATA%\rfortune\cache\) - Added tests for reading/writing cache and ensuring uniqueness of quotes
- Introduced
--clear-cacheflag to manually delete the entire cache directory
✅ Misc
- Ensured full cross-platform compatibility (Linux, macOS, Windows)
- Cleaned up unused code and improved module boundaries
[v0.2.2] - 2025-07-29
Changed
- Updated the
README.mdin thehomebrew-rfortunetap repository to include installation instructions via Homebrew.
Notes
- No changes to the binary or functionality of
rfortuneitself.
[v0.2.1] - 2025-07-29
Added
- Support for publishing
rfortuneto crates.io - Updated
Cargo.tomlwith metadata required by crates.io:- Package description, authors, license, keywords, categories
- Repository and homepage URLs
- Included files for packaging
Notes
- This version does not introduce new features or changes to functionality.
- Users can now install
rfortunedirectly via:cargo install rfortune
[v0.2.0] - 2025-07-27
✨ Added
- Support for
--initflag to automatically create the default directory and a samplerfortunes.datfile. - Cross-platform default path detection:
- Linux/macOS:
/usr/local/share/rfortune/rfortunes.dat - Windows:
%APPDATA%\rfortune\rfortunes.dator fallback toC:\Users\Public\rfortune\rfortunes.dat
- Linux/macOS:
- Basic CLI argument parsing via
clap:--file <path>to specify a custom.datfile--version,--helpstandard output
- New
README.mdwith full documentation of features, usage, installation, and init. - Modular refactoring of codebase:
main.rs: CLI and application entry pointloader.rs: reads and parses.datfilesfortune.rs: selects a random fortune
🛠 Changed
- Default fortune file format now expects phrases separated by
%on their own line (BSD style). - Improved error messages and file validation.
v0.5.2
Changelog
[0.5.2] - 2025-11-04
Added
- New
ConsoleLogutility for rich, colorized console output with Unicode symbols:- ℹ
info()– Informational messages - ✅
ok()– Successful operations ⚠️ warn()– Warnings and recoverable issues- ❌
ko()– Errors and critical failures
- ℹ
- Integrated
ConsoleLogthroughout configuration, cache, and file management commands for consistent CLI feedback. - New subcommand
config editfor editing the configuration file directly from the terminal:rfortune config edit→ opensrfortune.confusing the system’s default text editor.rfortune config edit --editor <name|path>→ opens it with a specific editor (e.g.vi,nano,code).
- Automatic editor detection logic:
- Checks
$VISUALand$EDITORenvironment variables. - Falls back to
nanoon macOS/Linux andnotepadon Windows.
- Checks
- Integrated colored console messages (
ConsoleLog) for clear feedback during editing.
Changed
- Configuration filename renamed from
config.yaml→rfortune.conffor better clarity and platform
consistency. - Updated initialization logic to automatically migrate existing
config.yamlto the new format (backup saved as
config.yaml.bak). - Unified editor behavior across platforms for a consistent CLI experience.
- Improved user feedback when creating or editing the configuration file.
Fixed
- Improved user feedback during
config init,file init, andcache clearoperations to prevent duplicate or missing
log messages.
[0.5.1] - 2025-10-27
Added
- Embedded Windows application icon (
res/rFortune.ico) directly into the executable.- Implemented using the
winresbuild dependency. - The icon is now visible in Windows Explorer and taskbar.
- Implemented using the
- New
res/directory introduced for graphical assets (SVG, PNG, ICO).
Changed
- Build process updated to automatically compile and embed Windows resources during
cargo build --release.
Notes
- The
.resfile generated during build is temporary and not stored in the repository.
[v0.5.0] - 2025-10-04
🔧 Refactoring
- Split CLI definition into a dedicated
cli.rsmodule - Added a new
commands.rsmodule to handle subcommand actions (config init,file init,cache clear) - Extracted configuration logic from
utils.rsinto a newconfig.rsmodule - Simplified
main.rsto only parse CLI input and dispatch commands
✨ CLI Improvements
- Introduced subcommands:
config init→ initialize the configuration filefile init→ create a sample default fortune file (rfortune.dat)cache clear→ clear the cache directory
- Enhanced
--helpoutput with a detailedlong_aboutdescription and usage examples
✅ Misc
- Clearer module boundaries (
cli,commands,config,utils,loader) - Improved maintainability and readability of the codebase
[v0.3.0] - 2025-07-30
🔧 Refactoring
- Removed
fortune.rsand consolidated logic into newutils.rs - Updated
main.rsandlib.rsto userfortunecrate structure consistently
🧪 Unit Testing
- Added unit tests for
loadermodule (parsing.datfiles) - Added unit tests for
utilsmodule, includingrandom_quoteandprint_random - Fixed the signature of
print_random()to accept file path for cache handling
💾 Cache Support
- Implemented cache system to avoid repeating the same fortune twice
- Cache is stored in user-specific system path (
$XDG_DATA_HOME/rfortune/cache/or%APPDATA%\rfortune\cache\) - Added tests for reading/writing cache and ensuring uniqueness of quotes
- Introduced
--clear-cacheflag to manually delete the entire cache directory
✅ Misc
- Ensured full cross-platform compatibility (Linux, macOS, Windows)
- Cleaned up unused code and improved module boundaries
[v0.2.2] - 2025-07-29
Changed
- Updated the
README.mdin thehomebrew-rfortunetap repository to include installation instructions via Homebrew.
Notes
- No changes to the binary or functionality of
rfortuneitself.
[v0.2.1] - 2025-07-29
Added
- Support for publishing
rfortuneto crates.io - Updated
Cargo.tomlwith metadata required by crates.io:- Package description, authors, license, keywords, categories
- Repository and homepage URLs
- Included files for packaging
Notes
- This version does not introduce new features or changes to functionality.
- Users can now install
rfortunedirectly via:cargo install rfortune
[v0.2.0] - 2025-07-27
✨ Added
- Support for
--initflag to automatically create the default directory and a samplerfortunes.datfile. - Cross-platform default path detection:
- Linux/macOS:
/usr/local/share/rfortune/rfortunes.dat - Windows:
%APPDATA%\rfortune\rfortunes.dator fallback toC:\Users\Public\rfortune\rfortunes.dat
- Linux/macOS:
- Basic CLI argument parsing via
clap:--file <path>to specify a custom.datfile--version,--helpstandard output
- New
README.mdwith full documentation of features, usage, installation, and init. - Modular refactoring of codebase:
main.rs: CLI and application entry pointloader.rs: reads and parses.datfilesfortune.rs: selects a random fortune
🛠 Changed
- Default fortune file format now expects phrases separated by
%on their own line (BSD style). - Improved error messages and file validation.
v0.5.1
Changelog
[0.5.1] - 2025-10-27
Added
- Embedded Windows application icon (
res/rFortune.ico) directly into the executable.- Implemented using the
winresbuild dependency. - The icon is now visible in Windows Explorer and taskbar.
- Implemented using the
- New
res/directory introduced for graphical assets (SVG, PNG, ICO).
Changed
- Build process updated to automatically compile and embed Windows resources during
cargo build --release.
Notes
- The
.resfile generated during build is temporary and not stored in the repository.
[v0.5.0] - 2025-10-04
🔧 Refactoring
- Split CLI definition into a dedicated
cli.rsmodule - Added a new
commands.rsmodule to handle subcommand actions (config init,file init,cache clear) - Extracted configuration logic from
utils.rsinto a newconfig.rsmodule - Simplified
main.rsto only parse CLI input and dispatch commands
✨ CLI Improvements
- Introduced subcommands:
config init→ initialize the configuration filefile init→ create a sample default fortune file (rfortune.dat)cache clear→ clear the cache directory
- Enhanced
--helpoutput with a detailedlong_aboutdescription and usage examples
✅ Misc
- Clearer module boundaries (
cli,commands,config,utils,loader) - Improved maintainability and readability of the codebase
[v0.3.0] - 2025-07-30
🔧 Refactoring
- Removed
fortune.rsand consolidated logic into newutils.rs - Updated
main.rsandlib.rsto userfortunecrate structure consistently
🧪 Unit Testing
- Added unit tests for
loadermodule (parsing.datfiles) - Added unit tests for
utilsmodule, includingrandom_quoteandprint_random - Fixed the signature of
print_random()to accept file path for cache handling
💾 Cache Support
- Implemented cache system to avoid repeating the same fortune twice
- Cache is stored in user-specific system path (
$XDG_DATA_HOME/rfortune/cache/or%APPDATA%\rfortune\cache\) - Added tests for reading/writing cache and ensuring uniqueness of quotes
- Introduced
--clear-cacheflag to manually delete the entire cache directory
✅ Misc
- Ensured full cross-platform compatibility (Linux, macOS, Windows)
- Cleaned up unused code and improved module boundaries
[v0.2.2] - 2025-07-29
Changed
- Updated the
README.mdin thehomebrew-rfortunetap repository to include installation instructions via Homebrew.
Notes
- No changes to the binary or functionality of
rfortuneitself.
[v0.2.1] - 2025-07-29
Added
- Support for publishing
rfortuneto crates.io - Updated
Cargo.tomlwith metadata required by crates.io:- Package description, authors, license, keywords, categories
- Repository and homepage URLs
- Included files for packaging
Notes
- This version does not introduce new features or changes to functionality.
- Users can now install
rfortunedirectly via:cargo install rfortune
[v0.2.0] - 2025-07-27
✨ Added
- Support for
--initflag to automatically create the default directory and a samplerfortunes.datfile. - Cross-platform default path detection:
- Linux/macOS:
/usr/local/share/rfortune/rfortunes.dat - Windows:
%APPDATA%\rfortune\rfortunes.dator fallback toC:\Users\Public\rfortune\rfortunes.dat
- Linux/macOS:
- Basic CLI argument parsing via
clap:--file <path>to specify a custom.datfile--version,--helpstandard output
- New
README.mdwith full documentation of features, usage, installation, and init. - Modular refactoring of codebase:
main.rs: CLI and application entry pointloader.rs: reads and parses.datfilesfortune.rs: selects a random fortune
🛠 Changed
- Default fortune file format now expects phrases separated by
%on their own line (BSD style). - Improved error messages and file validation.
v0.5.0
Changelog
[v0.5.0] - 2025-10-04
🔧 Refactoring
- Split CLI definition into a dedicated
cli.rsmodule - Added a new
commands.rsmodule to handle subcommand actions (config init,file init,cache clear) - Extracted configuration logic from
utils.rsinto a newconfig.rsmodule - Simplified
main.rsto only parse CLI input and dispatch commands
✨ CLI Improvements
- Introduced subcommands:
config init→ initialize the configuration filefile init→ create a sample default fortune file (rfortune.dat)cache clear→ clear the cache directory
- Enhanced
--helpoutput with a detailedlong_aboutdescription and usage examples
✅ Misc
- Clearer module boundaries (
cli,commands,config,utils,loader) - Improved maintainability and readability of the codebase
[v0.3.0] - 2025-07-30
🔧 Refactoring
- Removed
fortune.rsand consolidated logic into newutils.rs - Updated
main.rsandlib.rsto userfortunecrate structure consistently
🧪 Unit Testing
- Added unit tests for
loadermodule (parsing.datfiles) - Added unit tests for
utilsmodule, includingrandom_quoteandprint_random - Fixed the signature of
print_random()to accept file path for cache handling
💾 Cache Support
- Implemented cache system to avoid repeating the same fortune twice
- Cache is stored in user-specific system path (
$XDG_DATA_HOME/rfortune/cache/or%APPDATA%\rfortune\cache\) - Added tests for reading/writing cache and ensuring uniqueness of quotes
- Introduced
--clear-cacheflag to manually delete the entire cache directory
✅ Misc
- Ensured full cross-platform compatibility (Linux, macOS, Windows)
- Cleaned up unused code and improved module boundaries
[v0.2.2] - 2025-07-29
Changed
- Updated the
README.mdin thehomebrew-rfortunetap repository to include installation instructions via Homebrew.
Notes
- No changes to the binary or functionality of
rfortuneitself.
[v0.2.1] - 2025-07-29
Added
- Support for publishing
rfortuneto crates.io - Updated
Cargo.tomlwith metadata required by crates.io:- Package description, authors, license, keywords, categories
- Repository and homepage URLs
- Included files for packaging
Notes
- This version does not introduce new features or changes to functionality.
- Users can now install
rfortunedirectly via:cargo install rfortune
[v0.2.0] - 2025-07-27
✨ Added
- Support for
--initflag to automatically create the default directory and a samplerfortunes.datfile. - Cross-platform default path detection:
- Linux/macOS:
/usr/local/share/rfortune/rfortunes.dat - Windows:
%APPDATA%\rfortune\rfortunes.dator fallback toC:\Users\Public\rfortune\rfortunes.dat
- Linux/macOS:
- Basic CLI argument parsing via
clap:--file <path>to specify a custom.datfile--version,--helpstandard output
- New
README.mdwith full documentation of features, usage, installation, and init. - Modular refactoring of codebase:
main.rs: CLI and application entry pointloader.rs: reads and parses.datfilesfortune.rs: selects a random fortune
🛠 Changed
- Default fortune file format now expects phrases separated by
%on their own line (BSD style). - Improved error messages and file validation.
v0.3.0
Changelog
[v0.3.0] - 2025-07-30
🔧 Refactoring
- Removed
fortune.rsand consolidated logic into newutils.rs - Updated
main.rsandlib.rsto userfortunecrate structure consistently
🧪 Unit Testing
- Added unit tests for
loadermodule (parsing.datfiles) - Added unit tests for
utilsmodule, includingrandom_quoteandprint_random - Fixed the signature of
print_random()to accept file path for cache handling
💾 Cache Support
- Implemented cache system to avoid repeating the same fortune twice
- Cache is stored in user-specific system path (
$XDG_DATA_HOME/rfortune/cache/or%APPDATA%\rfortune\cache\) - Added tests for reading/writing cache and ensuring uniqueness of quotes
- Introduced
--clear-cacheflag to manually delete the entire cache directory
✅ Misc
- Ensured full cross-platform compatibility (Linux, macOS, Windows)
- Cleaned up unused code and improved module boundaries
[v0.2.2] - 2025-07-29
Changed
- Updated the
README.mdin thehomebrew-rfortunetap repository to include installation instructions via Homebrew.
Notes
- No changes to the binary or functionality of
rfortuneitself.
[v0.2.1] - 2025-07-29
Added
- Support for publishing
rfortuneto crates.io - Updated
Cargo.tomlwith metadata required by crates.io:- Package description, authors, license, keywords, categories
- Repository and homepage URLs
- Included files for packaging
Notes
- This version does not introduce new features or changes to functionality.
- Users can now install
rfortunedirectly via:cargo install rfortune
[v0.2.0] - 2025-07-27
✨ Added
- Support for
--initflag to automatically create the default directory and a samplerfortunes.datfile. - Cross-platform default path detection:
- Linux/macOS:
/usr/local/share/rfortune/rfortunes.dat - Windows:
%APPDATA%\rfortune\rfortunes.dator fallback toC:\Users\Public\rfortune\rfortunes.dat
- Linux/macOS:
- Basic CLI argument parsing via
clap:--file <path>to specify a custom.datfile--version,--helpstandard output
- New
README.mdwith full documentation of features, usage, installation, and init. - Modular refactoring of codebase:
main.rs: CLI and application entry pointloader.rs: reads and parses.datfilesfortune.rs: selects a random fortune
🛠 Changed
- Default fortune file format now expects phrases separated by
%on their own line (BSD style). - Improved error messages and file validation.
v0.2.2
Changelog
[v0.2.2] - 2025-07-29
Changed
- Updated the
README.mdin thehomebrew-rfortunetap repository to include installation instructions via Homebrew.
Notes
- No changes to the binary or functionality of
rfortuneitself.
[v0.2.1] - 2025-07-29
Added
- Support for publishing
rfortuneto crates.io - Updated
Cargo.tomlwith metadata required by crates.io:- Package description, authors, license, keywords, categories
- Repository and homepage URLs
- Included files for packaging
Notes
- This version does not introduce new features or changes to functionality.
- Users can now install
rfortunedirectly via:cargo install rfortune
[v0.2.0] - 2025-07-27
✨ Added
- Support for
--initflag to automatically create the default directory and a samplerfortunes.datfile. - Cross-platform default path detection:
- Linux/macOS:
/usr/local/share/rfortune/rfortunes.dat - Windows:
%APPDATA%\rfortune\rfortunes.dator fallback toC:\Users\Public\rfortune\rfortunes.dat
- Linux/macOS:
- Basic CLI argument parsing via
clap:--file <path>to specify a custom.datfile--version,--helpstandard output
- New
README.mdwith full documentation of features, usage, installation, and init. - Modular refactoring of codebase:
main.rs: CLI and application entry pointloader.rs: reads and parses.datfilesfortune.rs: selects a random fortune
🛠 Changed
- Default fortune file format now expects phrases separated by
%on their own line (BSD style). - Improved error messages and file validation.
v0.2.1
Changelog
Changelog
[v0.2.1] - 2025-07-29
Added
- Support for publishing
rfortuneto crates.io - Updated
Cargo.tomlwith metadata required by crates.io:- Package description, authors, license, keywords, categories
- Repository and homepage URLs
- Included files for packaging
Notes
- This version does not introduce new features or changes to functionality.
- Users can now install
rfortunedirectly via:cargo install rfortune
[v0.2.0] - 2025-07-27
✨ Added
- Support for
--initflag to automatically create the default directory and a samplerfortunes.datfile. - Cross-platform default path detection:
- Linux/macOS:
/usr/local/share/rfortune/rfortunes.dat - Windows:
%APPDATA%\rfortune\rfortunes.dator fallback toC:\Users\Public\rfortune\rfortunes.dat
- Linux/macOS:
- Basic CLI argument parsing via
clap:--file <path>to specify a custom.datfile--version,--helpstandard output
- New
README.mdwith full documentation of features, usage, installation, and init. - Modular refactoring of codebase:
main.rs: CLI and application entry pointloader.rs: reads and parses.datfilesfortune.rs: selects a random fortune
🛠 Changed
- Default fortune file format now expects phrases separated by
%on their own line (BSD style). - Improved error messages and file validation.
v0.2.0
Changelog
[v0.2.0] - 2025-07-27
✨ Added
- Support for
--initflag to automatically create the default directory and a samplerfortunes.datfile. - Cross-platform default path detection:
- Linux/macOS:
/usr/local/share/rfortune/rfortunes.dat - Windows:
%APPDATA%\rfortune\rfortunes.dator fallback toC:\Users\Public\rfortune\rfortunes.dat
- Linux/macOS:
- Basic CLI argument parsing via
clap:--file <path>to specify a custom.datfile--version,--helpstandard output
- New
README.mdwith full documentation of features, usage, installation, and init. - Modular refactoring of codebase:
main.rs: CLI and application entry pointloader.rs: reads and parses.datfilesfortune.rs: selects a random fortune
🛠 Changed
- Default fortune file format now expects phrases separated by
%on their own line (BSD style). - Improved error messages and file validation.