Fortune - but in rust
| .github/workflows | ||
| src | ||
| .gitignore | ||
| .gitlab-ci.yml | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| readme.md | ||
Fortune-mod (in rust)
This is a clone of the original fortune command found on many unix systems
It's primarily an educational project in which i aim to completely reimplement the command.
Progress
- Print a fortune from a fortunes file
- Specify a cutoff for what is considered a short fortune (the
-nflag) - Specify whether a short or a long fortune should be printed (the
-lflag) - Wait n amount of seconds before the program exits (the
-wflag) - Allow to filter with a pattern (the
-mflag) - Ignore case for the pattern (the
-iflag) - Allow multiple fortune cookie files
- Implement the
-fflag
Installing
Prerequisites:
- rust
- clang
- pkg-config
- openssl
Build:
cargo install https://github.com/runebaas/fortune-mod.rs.git
Fortune files
Place your fortune files in one of the following locations:
- *nix
- /usr/share/fortune
- /usr/share/games/fortunes
- ./fortunes
- windows
- ./fortunes
- ./cookies