The Daily Fortune said by a Cow
Let me share you something useless I’ve made the last week. I like the fortune command on Linux that displays a message randomly taken from a text database (definitions, jokes, nerd references, and so on..), and I like cowsay that makes a cow (or something else) saying something in your terminal.
So here is my own implementation of these two commands : The Daily Fortune !
Everyday (at 00:00 UTC), a Cow or Tux will display the daily Fortune message.
If you want it in your RSS feed, just click on the “RSS Feed” button after selecting “Cowsay” or “Tuxsay”.
Depending of the date, the Cow and Tux may be replaced by something else :)
Interested by what is behind this ? The sources are on GitHub.
The code is not rocket science. It’s just a script shell that fetch the fortune
output, format it with cowsay
, and pass it to a Python script that produces the HTML files from a template and generate the RSS feed.
Feel free to use it as you want !
Cherry on the cake : If you want to have these messages in your Terminal, just install cowsay
and fortune-mod
or fortune
(depending of your distro) with your favorite package manager.
Then, add this in your profile (.bashrc
or .zshrc
for example) :
fortune | cowsay
Et voilà !