There has been some discussion in the Monastery about the best nodes not being up to their name, meaning that there are several forgotten treasures that don't get the attention they deserve.
Here is a do-it-yourself alternative, obtained by taking the first 10 highest reputation nodes for each saint as of today.
Since it was generated automatically, according to a numerical criterium and depending on the limited space available, it could be debated whether this one is better or worse.
The attentive reader will notice that a few nodes in the best nodes are missing from this list, since they were produced by non-saints. Moreover, some of the nodes here might not be among the absolute best in PM. They are, however, the best nodes that each saint could produce, according to the other monks evaluation. So they should be worth a second glance.
At the very minimum, I believe that it is a good source of meditation upon the past experience at the Monastery.
First things first, here's the code to build this sort of super best nodes page.
#!/usr/bin/perl -w use strict; use HTML::TreeBuilder; use LWP::Simple; sub get_most_voted ($); my $saints_html = get "http://www.perlmonks.org/index.pl?" . "node=saints%20in%20our%20book"; my $saints_tree = HTML::TreeBuilder->new_from_content($saints_html); my $table = $saints_tree->look_down('_tag' => 'table', 'width' => '70%'); my @rows = $table->look_down('_tag' => 'tr', sub {$_[0]->look_down('_tag' => 'td')->as_text !~ /^#$/}); for (@rows) { my ($rank, $name, $xp, $writeups, $level, $leveln) = $_->look_down('_tag','td'); printf "[%s] \n", $name->as_text; # printf "( XP %d, writeups %d)\n", $xp->as_text, $writeups->as_t +ext; my $wu = $writeups->as_HTML; $wu =~ s/createtime%20DESC/hr/; $wu =~ s/&/&/g; my $address = "http://www.perlmonks.org"; if ($wu =~ /href="([^"]+)"/) { $address .= $1; $address .= "&length=10"; }; get_most_voted( $address ); } $saints_tree->delete; sub get_most_voted ($) { my $address = shift; my $nodes_page = get $address; my $nodes_tree = HTML::TreeBuilder->new_from_content($nodes_page); my $nodes_table = $nodes_tree->look_down('_tag' => 'table', 'id' => 'writeups'); my @writeups = $nodes_table->look_down('_tag' => 'tr', sub {$_[0]->look_down('_tag' => 'td')->as_text !~ /^Node ID$/} + ); print "<ul> "; for (@writeups) { my ($node_id, $node_title, $node_date) = $_->look_down('_tag' => 'td'); printf "<li>[id://%d]</li> ", $node_id->as_text; #printf "<!--%s--!>\n ", $node_title->as_text; } print "</ul>\n"; $nodes_tree->delete; };
You may customize this script according to your needs. For example, you could just pull the first 5 best nodes for each saint, or the best 20 for the first 35 saints only, and so on.
As for the specific method, I used HTML::TreeBuilder because I know the way it works and it's easy for me to think in terms of trees. Others may find this task easier to accomplish using other HTML::Parser cousins. I would be curious to see alternatives.
Then, the list of the most upvoted nodes for each saint.
vroom_ _ _ _ (_|| | |(_|>< _|
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Most loved nodes
by shotgunefx (Parson) on Mar 19, 2003 at 15:30 UTC | |
by bronto (Priest) on Mar 20, 2003 at 10:01 UTC | |
by Aristotle (Chancellor) on Mar 22, 2003 at 21:10 UTC | |
Re: Most loved nodes
by Gavin (Archbishop) on Oct 18, 2007 at 18:47 UTC |