How To Wiki
Advertisement

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[]

Methodology[]

  1. Download the archive
  2. Parsing the XML
  3. Extracting titles and first few lines
  4. Use titles to decide page type
    • 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
  5. Detect stubs
    • Stubs follow the following patterns
      {{stub}}
      {{object stub}}
      {{guide stub}}
  6. Processing Wanted Pages (still buggy)
    1. Download the Special:Wantedpages's html code
    2. Extract the list from the HTML
    3. Remove from list any obvious undesirables
      User:xxxx/....
    4. Form lists for titles matching
      Howto ...
      Guide ...
    5. 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
  7. Count the number of pages and print the lists
  8. Post them to their respective pages


tobe....


Created Pages[]

Objects[]

Howtos[]

Guides[]

Other Pages[]

Templates[]

To write the total amount of each page type

From HowTo Wiki, a Wikia wiki.

Advertisement