Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

Great!

I made it more suitable to launch in Windows...

(more graphical)

UPDATED

NOTICE
As 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...
cat header.txt $(perl tao.pl --today)
:) 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...
I changed the help's heading...
__.....-.. +-+-+-+-+-+ +-+-+-+ +-+-+ +-+-+-+-+-+ _,' `\ `-. |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 added a --B-today option to show with a banner as heading... With tkmore!
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] }; ...
And the option...
... 'today' => \&daily_tao, 'B-today' => \&daily_tao(1), ## ADDS A BANNER ...
Then, I could also call it...
perl tao.pl --B-today | tkmore -
Or in LINUX...
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 &
Thank you for your nice script!

I adjusted the ASCII-art to display well in my non monospaced screen....


In reply to Re: Get your Daily Tao Te Ching fix by chanio
in thread Get your Daily Tao Te Ching fix by radiantmatrix

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (8)
    As of 2014-12-22 07:13 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?





      Results (112 votes), past polls