1 unstable release
Uses old Rust 2015
|0.2.0||Nov 20, 2017|
#273 in #game
It's like the
program, but it's written in Rust (as a learning exercise). It also
uses a Yaml-format fortune database.
fortunelike outputs a random entry from the fortune database. The
database path can be chosen with the
--dbfile option or by
FORTUNELIKE_DB environment variable.
$ fortunelike -f example_db.yaml You find yourself reading a confusing message.
If no database path is provided,
fortunelike first defaults to
$HOME/.config/fortunelike-db and then
/etc/fortunelike-db. If no
database at all is found, or if the first one that is found does not
exist or cannot be parsed, a
[?] will be output.
fortunelike usually ends its output with a newline; if you don't
want this, pass the
--inline option. This is particularly
useful if you want to include the fortune in the middle of some other
$ echo "Insert some $(fortunelike -i -f words_db.yaml) text." Insert some banana text.
The fortune database file is a list of strings in Yaml format. See
words_db.yaml for examples.