Read the statement by Michael Teeuw here.
Unix Fortune
-
We already have the awesome MMM-Fortune module. Are you aware there’s a “fortune” command in unix/linux? You can install it in your pi like so:
sudo apt install fortune
It was intended to present a little epigram every time you log in to a terminal, but it can also be invoked at the command line.
I’d be inclined to replace the “Compliments” module with a module that pulls a short unix fortune using this command, updating on a configurable interval.Any takers? :-)
-
@spblat said in Unix Fortune:
We already have the awesome MMM-Fortune module.
Thank you for your kind words
Are you aware there’s a “fortune” command in unix/linux?
I was not.
a module that pulls a short unix fortune using this command, updating on a configurable interval
I put something together for you based on your request (and your kind words). User @sdetweil got the data over from the terminal to the module for me. (He’s awesome).
I took the liberty of naming it something unique. UnixFortune wasn’t doing it for me. FortuneUnix was no better but the combination was cool. At least, I think so.
https://github.com/mykle1/MMM-Fortunix
Pass along some help to someone that knows less than you
-
Epic! I’ll start playing with this. During my tests I will experiment with the “-s” and “-n” command line flags for adjusting fortune length and propose/submit updates. Thank you for putting this together!
-
@spblat said in Unix Fortune:
Thank you for putting this together!
Not a big deal. I was looking for something to play with. However, you are welcome. Enjoy the module.
Peace!
-
@spblat said in Unix Fortune:
Epic! I’ll start playing with this. During my tests I will experiment with the “-s” and “-n” command line flags for adjusting fortune length and propose/submit updates. Thank you for putting this together!
You can just fork the module and do anything you want with it :)
-
I found a small bug that causes some issues, at least when running on armbian and starting up via cron . It might be that ‘stock’ armbian isn’t properly setting up the $PATH as X starts. I tested against rasbian and this issue does not appear, and the ‘fix’ to add the full path to fortune (which really should always be done).
node_helper.js (line 20)
- exec(‘fortune -s’, (error, stdout, stderr) => {
- exec(‘/usr/games/fortune -s’, (error, stdout, stderr) => {