Wikipedia:Bots/Requests for approval/Bot0612 7
- The following discussion is an archived debate. Please do not modify it. Subsequent comments should be made in a new section. The result of the discussion was Approved.
Automatic or Manually Assisted: Automatic, semi-supervised
Programming Language(s): Python using pywikipedia
10,000ft overview of functions: Maintain the organisation of the BRFA categories by fixing the sortkeys on individual BRFAs, and removing redundant categories. Also, log any abnormal BRFAs for later human processing. (see below for further details)
Edit period(s): One large run to clean up the mess, then perhaps every week(?) to keep things tidy
Already has a bot flag (Y/N): Y
Function Details: The categories used for cataloging old BRFAs are in a bit of a mess. There are many requests (especially older ones) that do not have the correct sortkey (the bot's name or a defaultsort with the same effect) added to the category link. As a result they are lumped under W for Wikipedia.... This means that people (especially those unfamiliar with the process) who want to see if a bot has been approved, denied, etc cannot find the request easily using the categories.
A further issue with the categories is that lots of requests have the 'open requests' category on the page, along with one of the archival categories (approved/denied/expired/withdrawn). As a result, the open requests cat cannot be used for its original purpose: checking for BRFAs that have 'fallen through the gaps' due to not being transcluded on the main requests for approval page.
Now to what the bot actually does to fix these issues; it can be set to run on either:
- All subpages of Wikipedia:Bots/Requests for approval
- 'Open' requests (ones in Category:Wikipedia bot requests for approval)
- Any one of the archival categories
The bot will load each page in the set, and use the following logic to decide what to do:
- If both the open category and an archival category is on a page, strip the open category along with any tags surrounding it (very simplistic example here)
- If the request has an archive category, but the sortkey for said category either does not exist, or is not the bot name or an appropriate alternative (
{{#titleparts:{{PAGENAME}}|1|3}}
), add the bot name (and task number if relevant) as a sortkey. - If the request has no BRFA-related categories, log this to a page in the bot's userspace for later human attention (pages like this are likely to be malformed BRFAs, nonsense pages, or valid reqs that simply haven't had the templates added).
If this task is deemed necessary, I feel that it would be best do do the first run on all subpages of BRFA to clean up the worst, and then rerun on the smaller categories every week or so to keep things under control, although I'd be happy to do things differently if anyone has a better idea.
Discussion
editSounds good to me; BRFA can be quite daunting, and having an awkward category system doesn't help. The idea of better being able to see if reqs have fallen through the gaps particularly appeals. - Jarry1250 (t, c) 16:55, 1 February 2009 (UTC)[reply]
Approved for trial (25 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Seems straightforward. Anomie⚔ 20:41, 1 February 2009 (UTC)[reply]
- Trial complete. See here. Richard0612 11:49, 8 February 2009 (UTC)[reply]
- Approved. Looks good. Anomie⚔ 16:00, 8 February 2009 (UTC)[reply]
- The above discussion is preserved as an archive of the debate. Please do not modify it. Subsequent comments should be made in a new section.