Parse:...kiDump(3pm)
β¨ NAME β¨
Parse::MediaWikiDump β the toolkit for chewing through MediaWiki dump files π (it's a Perl module, 3pm, iykyk)
πΈ SYNOPSIS πΈ
use Parse::MediaWikiDump;
$pmwd = Parse::MediaWikiDump->new;
$pages = $pmwd->pages('pages-articles.xml');
$revisions = $pmwd->revisions('pages-articles.xml');
$links = $pmwd->links('links.sql');
π¦ DESCRIPTION π¦
Okay so bestie, this whole software suite hands you the tools you need to process the contents of two things: the XML page dump files, and the SQL based links dump file. That's the whole gig. π
π STATUS π
Real talk: this software is being RETIRED. πͺ¦
MediaWiki::DumpFile is the official successor to Parse::MediaWikiDump, and it ships with a compatibility library called MediaWiki::DumpFile::Compat that is 100% API compatible and is a near perfect standin for this module. It is faster in all instances where it counts, and it is actively maintained. Any undocumented deviation of MediaWiki::DumpFile::Compat from Parse::MediaWikiDump is considered a bug and will be fixed. So like. it's giving glow-up. β¨
π Migration π
Please begin using MediaWiki::DumpFile::Compat immediately as a replacement for this module. There will be no more features added to this software suite and bugs may not be fixed.
Parse::MediaWikiDump::Pages used to check the version of the dump file it is parsing and reject versions it does not know about; this behavior has been removed. The parser will now continue in this instance and hope for the best. This way this software will continue to run into the future with out requiring further adjustment for as long as the upstream fileformat remains compatible.
In the event there is an unfixable bug or the dump file format changes in an incompatible way, the Parse::MediaWikiDump module as a whole wil be replaced with a stub that brings in MediaWiki::DumpFile::Compat β this may never need to happen but it is the plan for when it does. Migrating on your terms instead of being forced to if this happens is suggested. π
π USAGE π
This module is a factory class β its whole vibe is letting you create instances of the individual parser objects. Slay.
$pmwd->pagesβ Returns aParse::MediaWikiDump::Pagesobject capable of parsing an article XML dump file with one revision per each article. One revision per article, okay? that's the whole point. π$pmwd->revisionsβ Returns aParse::MediaWikiDump::Revisionsobject capable of parsing an article XML dump file with multiple revisions per each article. she's multi-revision, she contains multitudes.$pmwd->linksβ Returns aParse::MediaWikiDump::Linksobject capable of parsing an article links SQL dump file. π§
π General π
All parser creation invocations require a location of source data to parse; this argument can be either a filename or a reference to an already open filehandle. Both are valid, pick your fighter.
β οΈ Not me warning you: this entire software suite willdie()upon errors in the file or if internal inconsistencies have been detected. π If this concerns you then you can wrap the portion of your code that uses these calls witheval(). Protect your peace (and your process).
π AUTHOR π
This module was created, documented, and is maintained by Tyler Riddle <triddle@gmail.com>. iconic behavior fr fr.
Fix for bug 36255 "Parse::MediaWikiDump::page::namespace may return a string which is not really a namespace" provided by Amir E. Aharoni. π«Ά
π BUGS π
Please report any bugs or feature requests to bug-parse-mediawikidump@rt.cpan.org, or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Parse-MediaWikiDump>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. β¨ the pipeline is real.
π₯ Known Bugs π₯
No known bugs at this time. π (yes we're as shocked as you are)
β COPYRIGHT & LICENSE β
Copyright 2005 Tyler Riddle, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
okay that's the whole page bestie, no cap π This was the Parse:...kiDump(3pm) page from the User Contributed Perl Documentation, built with perl v5.36.0 and dated 2022-10-14 β typed up with love, periodt. ππ
π¦ where this page comes from
- ubuntu noble: libparse-mediawikidump-perl 1.0.6-4 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- ubuntu resolute: libparse-mediawikidump-perl 1.0.6-4 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- ubuntu stonking: libparse-mediawikidump-perl 1.0.6-4 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms