Wikipedia talk:WikiProject Tree of Life/Articles without images
From Wikipedia, the free encyclopedia
This is the perl script that I used to create the list.
#!perl -w open IN, "bzcat ../../20051211_pages_articles.xml.bz2 |" or die $!; $/="<page>\n"; my %ns; my $header = <IN>; while ($header =~ m#<namespace key=".{1,3}">(.*?)</namespace>#g) { $ns{$1} = 1; } while (<IN>) { my ($tit) = m#<title>(.*)</title>#; next if $tit =~ /^(.+?):/ and $ns{$1}; if (/#REDIRECT\s*\[\[(.*)]]/) { next; } next if not /{{\s*Taxobox/i; s/<!--.*?-->/ /sg; # replace angle brackets by html entities! next if /\[\[[iI]mage/ or /Taxobox image/i or /\|\s*image\s*=/; my @taxo; if (/[^a-z]regnum[^a-z][^'\n]+\[\[(.*)]](\w*)/) { push @taxo, $1.$2; } if (/[^a-z]classis[^a-z][^'\n]+\[\[(.*)]](\w*)/) { push @taxo, $1.$2; } if (/[^a-z]ordo[^a-z][^'\n]+\[\[(.*)]](\w*)/) { push @taxo, $1.$2; } if (/[^a-z]familia[^a-z][^'\n]+\[\[(.*)]](\w*)/) { push @taxo, $1.$2; } s/.*\|// for @taxo; print "* ", join ' - ', @taxo, "[\[$tit]]\n"; }
[edit] Going down the lists
I finished going through the mammals list today, adding images and deleting old entries that have images. Next project: Plants. Bob the Wikipedian (talk) 20:29, 19 May 2008 (UTC)