Databases for the fortune
command.
Per Wikipedia,
fortune
is a program that displays a pseudorandom message from a database of quotations that first appeared in Version 7 Unix.
Here's an example:
$ fortune
Fortune favors the lucky.
This repo contains databases for use with the fortune
command.
Why yes, I did indeed spend way too much time customizing a Linux emulator that runs inside your browser and lets you see the results. It looks like this:
- THE INVISIBLE STATES OF AMERICA, some of my favorite microfiction from @ThePatanoiac
- tweetfortune.py, a script to build fortune databases from a public Twitter timeline
-
Install
fortune
. This can be done on macOS with Homebrew or pkgin, or on Linux, BSD, and most other Unix variants with the standard package manager. -
Build one of the databases here. Fortune's
strfile
can assemble the text files in this repo into databases:$ strfile invisiblestates/invisiblestates "invisiblestates/invisiblestates.dat" created There were 50 strings Longest string: 210 bytes Shortest string: 172 bytes
-
Run
fortune
against your newly built database:$ fortune invisiblestates/invisiblestates | fold -w 80 -s RUSH: Abandoned riverboats have been made into cathedrals by mermaids. There are giant toads here, whose legs are served with rose mustard. - THE INVISIBLE STATES OF AMERICA A TOURISM GUIDE BY UEL ARAMCHEK
I think it is nice to put in your .bashrc
or equivalent shell startup script.
fold -w 80 -s
will insert line breaks after a space at or before 80 characters. This command is actually part of POSIX so should be on any Unix system.- lolcatjs makes pretty colors.
Here's an example of those two in action: