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  Approved.

Operator: Tom.Reding (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)

Time filed: 00:44, Tuesday, March 6, 2018 (UTC)

Automatic, Supervised, or Manual: automatic

Programming language(s): C# via AWB

Source code available: User:Tom.Bot/Task4 code

Function overview: Fix low hanging fruit in Category:Pages using deprecated image syntax where infobox syntax is the cause.

Links to relevant discussions (where appropriate): Non-controversial maintenance cat cleanup, but fwiw: user talk 1, 2, 3, 4

Edit period(s): Piecemeal

Estimated number of pages affected: ~50,000 (~1/2 the current category size, based on manual runs)

Exclusion compliant (Yes/No): Yes

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

Function details: Example fixes: 1, 2, 3, 4, 5, 6.

  1. Fix cases where only image size is specified via the deprecated syntax, with allowances for 'center', 'centre', and 'thumb' (i.e. 1).
  2. If a null |image_size= infobox param exists, fill it in with the deprecated-syntax size (i.e. 4).
  3. If a non-null |image_size= infobox param exists, skip it if the deprecated-syntax size != the infobox |image_size=, otherwise fix it, and mention the dup in the edit summary (i.e. 2, 6).
  4. If no size is specified via the deprecated syntax, only fix pages where the associated |image_size= param is not specified in the infobox (i.e. 1, 3); otherwise skip (these skipped cases should be reviewed manually to make sure the existing, but not-yet-enacted, |image_size= is indeed appropriate).

The bot works on an infobox-by-infobox basis—each infobox's unique image & image size param(s) and aliases need to be coded for individually and explicitly. When a new template is added to the code, the bot will be operated manually (this can be done on the operator's account instead, if desired) for 50 edits to verify operation.

Cosmetic changes piggybacked if a syntax fix is performed:

  1. Whitespace alignment used by the image param is maintained as long as the whitespace immediately before or after the param is used for the alignment (i.e. 1 + all examples). If a tab is used after the =, or > 2 whitespace chars are used after the =, the page is skipped (it's on the todo list, though).
  2. Infobox lines which end with a pipe |, but don't start with a pipe, are converted to starting with pipes (i.e. 5).
  3. WP:GenFixes are on.

Discussion[edit]

Indubitably!   ~ Tom.Reding (talkdgaf)  14:29, 6 March 2018 (UTC)[reply]
Yup, those 3 pages are indeed skipped. An infobox parameter or infobox-closing )) are required after the first image-closing ]], and skips anything with captions and/or alt text (for now; at least for this run).   ~ Tom.Reding (talkdgaf)  13:25, 8 March 2018 (UTC)[reply]

Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Don't really see any holdup for this. I'll have some questions, but I need to see the bot in action first. Headbomb {t · c · p · b} 22:08, 9 March 2018 (UTC)[reply]

Trial complete. Edits   ~ Tom.Reding (talkdgaf)  23:03, 9 March 2018 (UTC)[reply]

((BAG assistance needed))   ~ Tom.Reding (talkdgaf)  02:02, 17 March 2018 (UTC)[reply]

 Approved. No issues. Headbomb {t · c · p · b} 20:49, 17 March 2018 (UTC)[reply]

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.