in reply to Get your Daily Tao Te Ching fix
Great!
I made it more suitable to launch in Windows...(more graphical)
UPDATED
NOTICEAs remembered later by radiantmatrix adding the following code will break the 'minimalistic' style required for adding it to cookies or other pieces of text that people use to do. It even makes the text longer... So, use it at your own discretion. Or add it as a second pipe like...I changed the help's heading...:) I'm sorry, radiantmatrix ... It wasn't my intention to change the spirit of your script. I should have noticed your purpose of leaving the output so alone :). I was only wanting to see it more friendly. And didn't imagine it inside another thing...cat header.txt $(perl tao.pl --today)
And added a --B-today option to show with a banner as heading... With tkmore!__.....-.. +-+-+-+-+-+ +-+-+-+ +-+-+ +-+-+-+-+-+ _,' `\ `-. |D|a|i|l|y| |T|a|o| |t|e| |C|h|i|n|g| / /['\ | \ +-+-+-+-+-+ +-+-+-+ +-+-+ +-+-+-+-+-+ .' `.:/ .' L O-----------------------------------O | ,' | | Tao Te Ching (TTC) from: | | ,---'' | |http://acc6.its.brooklyn.cuny.edu/ | | ,' | | ~phalsall/texts/taote-v4.html | `. | ,. / | | \ ` ,.' / | See the file license.txt after | '` _,' | first run for the GNL license. | '--. _..-' O-----------------------------------O
And the option...sub daily_tao { my $banner = shift;## NEW OPTION TO ADD A HEADER WITH THE TITLE ... print <<HEAD if ($banner); __.....-.. _,' `\ `-. / /['\ | \ +-+-+-+-+-+ +-+-+-+ .' `.:/ .' . |D|a|i|l|y| |T|a|o| | ,' | +-+-+ +-+-+-+-+-+ | ,---'' | |T|e| |C|h|i|n|g| | ,' | +-+-+-+-+-+-+-+ +-+ `. | ,. / |p|r|i|n|t|e|r| |@| \ ` ,.' / +-+-+-+-+-+-+-+ +-+ '` _,' '--. _..-' HEAD printf "%s: %s\n%s", @{ $chapter[$day_index] }; ...
Then, I could also call it...... 'today' => \&daily_tao, 'B-today' => \&daily_tao(1), ## ADDS A BANNER ...
Or in LINUX...perl tao.pl --B-today | tkmore -
Thank you for your nice script!perl tao.pl --B-today | perl -e'while (<>){print($_,$/) if ($_=~s/^/ +/ && $_=~s/[\r\n]//g)}'| Xdialog --rc-file ~/.ocrebox.rc --title="To +day's TAO" --textbox - 0 0 &
I adjusted the ASCII-art to display well in my non monospaced screen....
- Landlords production is only eaten by landlords...
- Wherever I lay my KNOPPIX disk, a new FREE LINUX nation could be established
In Section
Cool Uses for Perl