Wikipedia:Bots/Requests for approval/AnomieBOT 24
- 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. by MBisanz talk 08:18, 1 March 2009 (UTC)[reply]
Automatic or Manually Assisted: Automatic, unsupervised
Programming Language(s): Perl
Function Overview: Remove the deprecated website
, imdb_id
, and amg_id
parameters from instances of {{Infobox Film}}, while adding the links those parameters formerly generated to the article's External links section.
Edit period(s): One-time run.
Already has a bot flag (Y/N): Y
Function Details: Per request, the bot will load all pages containing {{Infobox Film}}. Any website
, imdb_id
, or amg_id
parameters will be removed, and {{official}}, {{imdb title}}, or {{amg movie}} (respecively) will be added to the article's External links section if that section does not already contain the corresponding link. An External links section will be created if necessary. Any issues encountered will be logged to User:AnomieBOT/TemplateReplacer13 log. Each page will only be processed once (a local database holds the pageids of all successfully-processed pages).
Discussion[edit]
The only real "fun" part here is determining where exactly the article ends and the navboxes/stub templates begin (cats and interlanguage links are trivial). The approach taken here is to consider any line containing only templates, categories, interlanguage links, and/or comments to be part of the "end junk", with a list of specific templates likely to be false positives (e.g. {{reflist}} and templates for various sister project boxes). The new links are inserted at the top of the section if website
is being moved, or else after any existing film external link template, or else at the end of the section (but still above navboxes etc) if all else fails. Source is at User:AnomieBOT/source/tasks/TemplateReplacer13.pm.
FYI, there will be several thousand page edits (just the imdb_id
parameters needing links is apparently over 6000 pages). I can easily limit edits to only those pages that actually need external links added (many already have the infobox links present in the external links section); all it takes is changing one flag to limit it or not. Anomie⚔ 03:41, 23 February 2009 (UTC)[reply]
Approved for trial (20 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Looks well-thought out, so I doubt there'll be any problems, but it's best to run a trial just in case. Richard0612 22:59, 28 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.