Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

New version of Parse::MediaWikiDump

Edgar Meij
2009-12-14
2013-05-30
  • Edgar Meij
    Edgar Meij
    2009-12-14

    The latest version(s) of Parse::MediaWikiDump breaks some of the extraction scripts (extractWikipediaData.pl and splitData.pl). The call

    <code>
    my $pages = Parse::MediaWikiDump::Pages->new($dump_file);                 
    my $page;                                  
    while(defined($page = $pages->page)) {…}
    </code>

    Should be replaced by
    <code>
    my $pmwd = Parse::MediaWikiDump->new;          
    my $pages = $pmwd->pages($dump_file) ;                   
    my $page;      
    while(defined($page = $pages->next)) {…}
    </code>

    hth,

    Edgar

     
  • Thats true. I'm running the scripts over the Portuguese Wikipedia and i had to replace every $page->page by $page->next in extractWikipediaData.pl and splitData.pl

     
  • Scott Weinert
    Scott Weinert
    2011-06-10

    That was very helpful. I had to do the same thing. Thank you!