Wikipedia:Bots/Requests for approval/Theo's Little Bot 24


 * The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA. The result of the discussion was Symbol keep vote.svg Approved

Theo's Little Bot 24
Operator:

Time filed: 19:20, Sunday July 14, 2013 (UTC)

Automatic, Supervised, or Manual: Automatic

Programming language(s): Python

Source code available: who do you think i am?

Function overview: Converts  parameter in infobox poem to use start date. If unable to convert, adds the page to Category:Poem_publication_dates_needing_manual_review.

Links to relevant discussions (where appropriate): bot request

Edit period(s): One time run

Estimated number of pages affected:

Exclusion compliant (Yes/No): Nope

Already has a bot flag (Yes/No): Yes

Function details: For all pages that transclude infobox poem:
 * if  is present and actually contains a date:
 * parses the date into a datetime object using the dateutil Python module
 * prints this date out into start date, with  parameter == y if the original format was DD Month YYYY
 * updates  to be equal to the start date template with an html comment saying it was bot generated
 * if the bot was unable to parse, adds the page to hidden category Category:Poem_publication_dates_needing_manual_review

Discussion

 * Support as requester. There is clear community consensus for this action. Perhaps need to make the tracking category more generic, for use on other infoboxes in futiure? Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 21:37, 15 July 2013 (UTC)
 * I was about to ask why you thought it needed to be more generic when you edit-conflicted me with an explanation. :) Sure, Category:Pages with infobox parameters needing manual conversion to start date... jeez, talk about unwieldiness. Any [more concise] ideas?  Theopolisme ( talk )  21:47, 15 July 2013 (UTC)
 * Perhaps Category:Infoboxes needing manual conversion to use start date ? Andy Mabbett ( Pigsonthewing ); Talk to Andy; Andy's edits 15:18, 16 July 2013 (UTC)
 * Sounds like a winner.  Theopolisme ( talk )  15:25, 16 July 2013 (UTC)
 * BAGAssistanceNeeded A trial, perhaps?  Theopolisme ( talk )  21:27, 25 July 2013 (UTC)
 * Sorry for the delay. The template has few transclusions, so we'll go for a short trial. —  Earwig   talk 00:52, 1 August 2013 (UTC)
 * Edits. The only issue was that, when restarted, it retagged as being unparseable; I fixed this by checking first that the article wasn't tagged.  Theopolisme  ( talk )  03:56, 1 August 2013 (UTC)
 * Two things:
 * This one looks like you could've parsed it fine with a small change to your algorithm (since you're using mwparserfromhell, add a  method call to the value of publication_date before you run it through , but after you check for start date or the category, since it will strip those too).
 * You shouldn't be changing parameter names here. It doesn't matter with chess diagram since that template seems to ignore those parameters anyway, but in other cases, this would break stuff. Again, looks related to mwparserfromhell; make sure you're updated to at least version 0.2, since it was fixed for that release.
 * Other than that, looks good. —  Earwig   talk 02:30, 2 August 2013 (UTC)
 * I've updated to the latest version of mwpfh, and modified the algorithm per your suggestion.  Theopolisme ( talk )  03:12, 2 August 2013 (UTC)
 * Looks good. —  Earwig   talk 03:15, 2 August 2013 (UTC)
 * The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA.