Wikipedia:Bots/Requests for approval/ProcBot 2


 * 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

ProcBot 2
Operator:

Time filed: 00:23, Saturday, July 18, 2020 (UTC)

Automatic, Supervised, or Manual: automatic

Programming language(s): Ruby

Source code available:

Function overview: Change text dates to use date templates. Only in infoboxes for Template:Infobox television (and associated templates, eg Template:Infobox television season) change manual dates (eg 23 June 2019) to ones using start date (in this case, )

Links to relevant discussions (where appropriate): Bot requests

Edit period(s): Continuous

Estimated number of pages affected: ~20k initial run

Exclusion compliant (Yes/No): Yes

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

Function details: The template already states: Use Start date (e.g. 1981) so that the date is included in the template's hCalendar microformat, and is properly formatted according to a reader's Wikipedia date and time preferences. Add

Quite a few articles don't do this. This will convert dates in plaintext (eg "23 June 2019") to using the relevant template. DMY/MDY dates are handled in the following order: if use dmy dates} or use mdy dates is present on the page, it'll add a df=y param as appropriate. If there isn't, then it'll default to the format currently used for the date. If it cannot parse the date, it'll skip (including for values like 'present'). This will only handle the first_aired and last_aired params.

Discussion
The bot script was changed from making a search query to fetching all articles transcluding the template and doing a regex on their content. Following discussion at WP:BOTREQ, a tracking category, Category:Pages using infobox television with nonstandard dates, was added to track this. Bot has been adjusted to use this category instead when fetching results. ProcrastinatingReader (talk) 13:04, 21 July 2020 (UTC)

BAGAssistanceNeeded ProcrastinatingReader (talk) 12:42, 25 July 2020 (UTC)

The scope of this task is unclear. Will it:
 * Operate on all plain text dates, even in body text?
 * Operate only on plain text dates in templates?
 * Operate only on plain text dates in selected templates? (If so, which templates?)
 * @ProcrastinatingReader, please clarify. -- Brown HairedGirl  (talk) • (contribs) 15:23, 27 July 2020 (UTC)
 * sorry, it's explained more fully at the BOTREQ link. It will only apply in television infoboxes. So not including body text. For point 3, the specific templates would be the two in my comments above. ProcrastinatingReader (talk) 15:29, 27 July 2020 (UTC)
 * Thanks, @ProcrastinatingReader. Please can you amend the Function overview above, to make that scope clear? --  Brown HairedGirl  (talk) • (contribs) 15:32, 27 July 2020 (UTC)
 * Done :) ProcrastinatingReader (talk) 15:34, 27 July 2020 (UTC)
 * Thanks. That's clearer. --  Brown HairedGirl  (talk) • (contribs) 18:03, 27 July 2020 (UTC)
 * I know I was involved in the discussion of this bot, and will recuse from final accept/decline duties, but this is clear-cut enough that at the very least we can send to trial (now that BHG's concerns have been clarified). Primefac (talk) 22:17, 2 August 2020 (UTC)
 * , looks like I'm getting a captcha error? ProcrastinatingReader (talk) 23:31, 2 August 2020 (UTC)
 * It's because you aren't autoconfirmed or flagged yet. To get autoconfirmed, you can log in as the bot, then add and remove a period from its user page 5x (10 edits total). Alternatively, request the  permission (from any admin or at WP:PERM/C). Cheers, --Mdaniels5757 (talk) 01:42, 3 August 2020 (UTC)
 * Heh. --Mdaniels5757 (talk) 01:44, 3 August 2020 (UTC)
 * Just figured it out at the same moment you responded hehe. Requested at PERM, since 'gaming' the edits in userspace seemed slightly questionable. ProcrastinatingReader (talk) 13:40, 3 August 2020 (UTC)

50 edits. Got a good variety of dates in. Couple of small bumps early on: March 28, 2009 " . Apparently Ruby's Date thinks it can make sense of that. Fixed by using regex to skip anything more than a single date. Affected templates were repeated with updated bot code, and it correctly skipped them. Then about 35 more processed with a good variety of date formats and cases, all dealt with correctly. ProcrastinatingReader (talk) 13:40, 3 August 2020 (UTC)
 * Bot tried to parse "MMMM YY", eg "September 1980". Fixed by adding an extra check which will reject any instances of month, year, or month/year only combinations (or, more accurately, will reject anything not in a US or American full date format) (3 errors while I was testing the fix for this, )
 * Bot tried to interpret " March 26, 2009 (Craft awards)
 * When one parameter is to be edited, but the other is empty, bot removed the empty one. Now it won't touch it.. Fix:
 * Looks good to me. —&#8205;Mdaniels5757 (talk &bull; contribs) 16:54, 19 August 2020 (UTC)

BAGAssistanceNeeded & ping since we've only got 2 active BAG currently I think? ProcrastinatingReader (talk) 11:47, 25 August 2020 (UTC)

This task should be good to go. There is even a 2012 RfC is support of this. – SD0001  (talk) 11:24, 2 September 2020 (UTC)
 * Primefac (talk) 16:54, 3 September 2020 (UTC)


 * Note task was amended slightly to account for different variables; see ProcBot 2.5 for details. Primefac (talk) 16:07, 10 November 2020 (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.