How to count and list all howto, guide, and object pages in Wikihowto

Using a PERL script and the backup archive of the Wikihowto you can sort out all pages that match the Howto, Guide, and Object pages. You can then count them and post the list on a page.

=Goal= A list of the pages organized in types was needed with the number of pages for each type. We didn't want to use categories at the time and we wanted to control the appearance. These needs were not supported by current MediaWiki software, so we needed to create a work around. So a script to be run periodically was an good solution.

=The Script=
 * Code for Script

=Methodology=


 * 1) Download the archive
 * 2) *http://howto.wikia.com/dbdumps/pages_current.xml
 * 3) Parsing the XML
 * 4) Extracting titles and first few lines
 * 5) Use titles to decide page type
 * 6) *With objects the page title gives no information so you must use the first few lines to find a pattern that matches the page type.
 * pattern match: Object and Wikipedia in the same line and that line be the first 2-3 lines
 * 1) Detect stubs
 * 2) *Stubs follow the following patterns
 * 3) Processing Wanted Pages (still buggy)
 * 4) Download the Special:Wantedpages's html code
 * 5) Extract the list from the HTML
 * 6) Remove from list any obvious undesirables
 * User:xxxx/....
 * 1) Form lists for titles matching
 * Howto ...
 * Guide ...
 * 1) For objects, match anything that is a single word or two words
 * This is just a guess that it will be an object but is most likely true
 * 1) Count the number of pages and print the lists
 * 2) Post them to their respective pages
 * This is just a guess that it will be an object but is most likely true
 * 1) Count the number of pages and print the lists
 * 2) Post them to their respective pages

tobe....

=Created Pages=

Objects

 * Help:Objects List
 * Help:Empty Objects
 * Help:Wanted Objects

Howtos

 * Help:Howto List
 * Help:Howto Stub List
 * Help:Wanted Howtos

Guides

 * Help:Guide List
 * Help:Guide Stub List
 * Help:Wanted Guides

Other Pages

 * Help:Help Pages List
 * Help:Redirects List
 * Help:Unknown List
 * Help:Meta List

Templates
To write the total amount of each page type
 * Template:numOfStubHowtos
 * Template:numOfHowtos
 * Template:numOfWantedHowtos


 * Template:numOfStubGuides
 * Template:numOfGuides
 * Template:numOfWantedGuides


 * Template:numOfWantedObjects
 * Template:numOfEmptyObjects
 * Template:numOfObjects


 * Template:numOfUnknowns
 * Template:numOfHelps
 * Template:numOfRedirects


 * Template:numOfMetas

From HowTo Wiki, a Wikia wiki.