in reply to Public export of Perl Monks database
Very simple, could use some more work, but this will get the job done. Just be sure and run it during the weekend or other 'less busy' times. ;) I also have some code over at Node XML to HTML that transforms the XML into HTML ... it's not perfect either, but it's a start.use strict; use warnings; use Data::Dumper; use XML::Simple; use LWP::Simple; our $URL = 'http://www.perlmonks.org/index.pl'; our $PATH = '/path/to/perlmonks/nodes'; for (0 ... 666666) { my $node = get "$URL?node_id=$_&displaytype=xml"; my $xml = XMLin($node); next if $xml->{title} =~ /Permission\s+Denied/i; next if $xml->{title} =~ /Not\s+found/i; open FH, '>', "$PATH/$_.xml" or die "can't write: $!"; print FH $node; sleep 5; # play nice ;) }
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: (jeffa) Re: Public export of Perl Monks database
by zby (Vicar) on Feb 21, 2003 at 18:45 UTC | |
by jeffa (Bishop) on Feb 21, 2003 at 19:02 UTC | |
by zby (Vicar) on Feb 21, 2003 at 19:25 UTC |