Parse:...::page(3pm)

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

πŸ’– Parse::MediaWikiDump::page β€” the manual page, bestie edition πŸŽ€

okay so this is Parse::MediaWikiDump::page(3pm) from the User Contributed Perl Documentation collection, and it's giving "one specific revision of a MediaWiki page, as an object" energy. let's get into it πŸ’…


✨ NAME ✨

Parse::MediaWikiDump::page β€” the object that represents one specific revision of a MediaWiki page. yeah. that's the whole vibe. πŸ¦‹


🌸 ABOUT 🌸

so basically, you do not go out here and make these yourself, bestie. this object is returned to you from the next method of Parse::MediaWikiDump::Pages and Parse::MediaWikiDump::Revisions. 😌

you most likely will not be creating instances of this particular object yourself. instead you use this object to access the information about a page in a MediaWiki instance. that's the whole point. main character object behavior. πŸ‘‘


⭐ SYNOPSIS ⭐

the classic. look at her:

$pages = Parse::MediaWikiDump::Pages->new('pages-articles.xml');

#get all the records from the dump files, one record at a time
while(defined($page = $pages->next)) {
  print "title '", $page->title, "' id ", $page->id, "\n";
}

get all the records from the dump files, one record at a time. slay. πŸ”₯


πŸ’€ STATUS πŸ’€

okay, not to be dramatic but β€” 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's faster in all instances where it counts, and it is actively maintained. 🫢

and get this β€” any undocumented deviation of MediaWiki::DumpFile::Compat from Parse::MediaWikiDump is considered a bug and will be fixed. no cap. πŸ’œ


🧚 METHODS 🧚

one bullet-list-of-methods per method, no skipping, we eat the whole plate πŸ“

  • $page->redirect β€” returns an empty string (such as '') for the main namespace, or a string containing the name of the namespace. πŸŒ€
  • $page->categories β€” returns a reference to an array that contains a list of categories, or undef if there are no categories. heads up though: this method does not understand templates and may not return all the categories the article actually belongs in. πŸ™ˆ
  • $page->title β€” returns a string of the full article title, including the namespace if present. πŸ“›
  • $page->namespace β€” returns a string of the namespace of the article, or an empty string if the article is in the default namespace. πŸ“‚
  • $page->id β€” returns a number that is the id for the page in the MediaWiki instance. πŸ”’
  • $page->revision_id β€” returns a number that is the revision id for the page in the MediaWiki instance. 🧾
  • $page->timestamp β€” returns a string in the following format: 2005-07-09T18:41:10Z. ⏰
  • $page->username β€” returns a string of the username responsible for this specific revision of the article, or undef if the editor was anonymous. πŸ•΅οΈ
  • $page->userid β€” returns a number that is the id for the user returned by $page->username, or undef if the editor was anonymous. πŸ†”
  • $page->userip β€” returns a string of the IP of the editor if the edit was anonymous, or undef otherwise. 🌐
  • $page->minor β€” returns 1 if this article was flaged as a minor edit, otherwise returns 0. ✏️
  • $page->text β€” returns a reference to a string that contains the article title text. πŸ“

and that's the whole page, bestie, you ate that πŸ’…βœ¨

perl v5.36.0 Β· 2022-10-14 β€” mwah, go read the successor module, ily, bye πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from