Package pywikipedia :: Module category :: Class CategoryTidyRobot
[show private | hide private]
[frames | no frames]

Class CategoryTidyRobot


Script to help a human to tidy up a category by moving its articles into
subcategories

Specify the category name on the command line. The program will pick up the
page, and look for all subcategories and supercategories, and show them with
a number adjacent to them. It will then automatically loop over all pages
in the category. It will ask you to type the number of the appropriate
replacement, and perform the change robotically.

If you don't want to move the article to a subcategory or supercategory, but to
another category, you can use the 'j' (jump) command.

Typing 's' will leave the complete page unchanged.

Typing '?' will show you the first few bytes of the current page, helping
you to find out what the article is about and in which other categories it
currently is.

Important:
 * this bot is written to work with the MonoBook skin, so make sure your bot
   account uses this skin

Method Summary
  __init__(self, catTitle, catDB)
  move_to_category(self, article, original_cat, current_cat)
Given an article which is in category original_cat, ask the user if it should be moved to one of original_cat's subcategories.
  run(self)

Method Details

move_to_category(self, article, original_cat, current_cat)

Given an article which is in category original_cat, ask the user if it should be moved to one of original_cat's subcategories. Recursively run through subcategories' subcategories. NOTE: current_cat is only used for internal recursion. You should always use current_cat = original_cat.

Generated by Epydoc 2.1 on Sun Jul 03 17:07:38 2005 http://epydoc.sf.net