User:AfdlBot




 * See Bots/Requests for approval/AfdlBot

Purpose
To track Articles for Deletion debates for specific types of articles.

The intention is to, in an automated fashion, maintain Afdl (Articles for deletion list?) pages, such as the already existing ones currently maintained manually by several WikiProjects: Project members, or other users interested in a particular group of articles would then check the relevant Afd list page, and get a list of currently open and recently closed Afd debates dealing with only those articles.
 * 1) WikiProject Georgia Tech/Deletion
 * 2) WikiProject Macintosh/Deletion
 * 3) WikiProject Pornography/Deletion
 * 4) WikiProject Video games/Deletion
 * 5) WikiProject Warcraft/Deletion
 * 6) WikiProject Webcomics/Deletion

The bot will run with human (er... muscine) oversight the first few times, then run nightly, without supervision, when it has been shown to be harmless and bugfree. It will maintain the lists on the Afdl pages, and will add to the Afd debates themselves.
 * Note: This debate has been added to the . AfdlBot 

A representative for any given project needs to agree to put their Afdl page under AfdlBot's automated supervision. If anyone wants their project removed, it will be removed. Consensus only, as always.

Configuration
List the following parameters in a new Section on the User:AfdlBot/Configuration page:
 * AFD List: The Afdl page to maintain (a Wikilink)
 * Talk templates: Templates on the Article talk page that identify it as an article of interest (a list of Wikilinks to the Templates, all on one line)
 * Article templates: Templates on Article itself that identify it as an article of interest (a list of Wikilinks to the Templates, all on one line)
 * Article categories: Article Categories that identify the article as an article of interest (a list of Wikilinks to the categories, all on one line. Remember to put an additional leading colon before the word Category inside the wikilink.)
 * Talk categories: Article Categories on the Article talk page that identify the article as an article of interest (a list of Wikilinks to the categories, all on one line. Remember to put an additional leading colon before the word Category inside the wikilink.)

WikiProject Georgia Tech

 * AFD List: WikiProject Georgia Tech/Deletion
 * Talk templates: Template:WikiProject Georgia Tech
 * Article templates: Template:Georgia Tech Navbox
 * Article categories: Category:Georgia Institute of Technology, Category:Georgia Institute of Technology people

Source Code
Python, Pywikipedia framework. Open Source as long as attribution is given. Current program will always be available at User:AfdlBot/Source.

The basic algorithm is:
 * 1) Login
 * 2) Read the configuration page (hardcoded)
 * 3) From the configuration, read the Afdl pages, to see what Afds are already listed, checking the open ones to see if they have closed, and removing closed listings over, say 30 days old
 * 4) Read the last N (say 12) Articles for deletion Log pages, starting with the current date (in theory, Afds should close within 5 days, in practice many stay open longer)
 * 5) For each Afd on each log page, read to all the article links mentioned (because some Afds may apply to multiple articles) and see if
 * 6) that article is nominated for deletion at this Afd debate, and
 * 7) that article is one any project on the configuration page is interested in, by looking for templates or categories
 * 8) Add any such Afds, with creation date (also close date if any, result if any) to the appropriate list for each project, sorted by open or closed, then by start date
 * 9) Mark the Afds as added to the appropriate Afdl list, that are not so marked already