View Single Post
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#456
Originally Posted by Sir_Krokofant View Post
I would like a 'nameday' (swedish) script, it would be nice to show it on the Billboard screen.
If by "nameday" you mean something like this:

http://stjarnhimlen.se/ndag/ndag2001.html

Then you could start by transforming that page into a text file (one day per line) in a way that you can parse by a script and then write a small shell script that greps the right day out of it, e.g.:

Code:
~ $ cat nameday.txt 
01.01. Nyårsdagen
02.01. Svea
...
08.01. Erland
...
~ $ awk "/^$(date +%d.%m.)/ { print "'$2'" }" nameday.txt
Erland
So the "nameday.txt" contains the names on each line (DD.MM. NAME), and the awk command gets today's name based on that. I've added a script to billboard-scripts, but you will have to write (copy'n'paste or process) your nameday.txt yourself
 

The Following 3 Users Say Thank You to thp For This Useful Post: