Parse:...kiDump(3pm)

πŸ“¦
version 1.0.6 Β· 3 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

✨ 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 a Parse::MediaWikiDump::Pages object 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 a Parse::MediaWikiDump::Revisions object capable of parsing an article XML dump file with multiple revisions per each article. she's multi-revision, she contains multitudes.
  • $pmwd->links β€” Returns a Parse::MediaWikiDump::Links object 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 will die() 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 with eval(). 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 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