I'm not too convinced this change needs to be made, but anyway, a copy of Everything will not help you too much in this case.

If you really want this, I suggest you just use HTML::Parser (or HTML::TokeParser::Simple) and make it so (it should be trivial).

here is some code (untested, but should work flawlessly)

use HTML::TokeParser::Simple; use URI::URL; use LWP::Simple 'get'; my $base = 'http://perlmonks.com/index.pl?replies=1&node_id=218130&dis +playtype=print'; my $html = get $base; my $p = HTML::TokeParser::Simple->new(\$html); my $n = 0; my @n = (); while(defined(my $t = $p->get_token)){ if( $t->is_start_tag('a') ) { push @n, URI::URL->new($t->return_attr->{href},$base)->abs if $t->return_attr->{href}; print '<strong>', $p->get_trimmed_text('/a'), "</strong><sup>$n</sup>"; $n++; }elsif( $t->is_end_tag('body') ) { print '<hr><pre>'; printf "%02.2d. %s\n",$_,$n[$_] for 0..$#n; print '</pre>'; } else { print $t->as_is; } }
You'll probably wanna tweak it some, to get exactly the look you want (you probably wanna ignore reply/comment links , strip away lastnode_id ...)

Enjoy ;)


MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
** The Third rule of perl club is a statement of fact: pod is sexy.


In reply to Re: Possible Improvements for Print View by PodMaster
in thread Possible Improvements for Print View by BrotherAde

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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.