User:Tstaerk: Difference between revisions

From KDE TechBase
No edit summary
 
No edit summary
Line 1: Line 1:
Here's how I draw a mindmap of this wiki:
Here's how I draw a mindmap of this wiki:
=Download all pages=
  duffman:~/developernew # cat ../wikimap/eigen.pl
  duffman:~/developernew # cat ../wikimap/eigen.pl
  #!/usr/bin/perl
  #!/usr/bin/perl
Line 17: Line 18:
   
   
  duffman:~/developernew #
  duffman:~/developernew #
../wikimap/eigen.pl | grep "^/" | grep -v ":" | grep -v "?" | while read a; do wget "http://developernew.kde.org$a"; done

Revision as of 16:58, 27 January 2007

Here's how I draw a mindmap of this wiki:

Download all pages

duffman:~/developernew # cat ../wikimap/eigen.pl
#!/usr/bin/perl
require HTML::LinkExtor;
use LWP::Simple; 

$p = HTML::LinkExtor->new(\&parse, "");
sub parse {
    my($tag, %links) = @_;
    my ($att, $url) = @{[%links]};
    print "$url\n";
}
my $content = get("http://developernew.kde.org/Special:Allpages"); #Get web page in content 
die "get failed" if (!defined $content);
my $parser = HTML::LinkExtor->new(); #create LinkExtor object with no callbacks
$p->parse($content); #parse content

duffman:~/developernew #


../wikimap/eigen.pl | grep "^/" | grep -v ":" | grep -v "?" | while read a; do wget "http://developernew.kde.org$a"; done