Wikipedia:Bots/Requests for approval/Yet another TfD implementor bot
- The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at Wikipedia:Bots/Noticeboard. The result of the discussion was Approved.
New to bots on Wikipedia? Read these primers!
- Approval process – How this discussion works
- Overview/Policy – What bots are/What they can (or can't) do
- Dictionary – Explains bot-related jargon
Operator: Snowmanonahoe (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 06:04, Thursday, June 8, 2023 (UTC)
Function overview: Merge {{IOC profile}} into {{Olympics.com profile}}.
Automatic, Supervised, or Manual: Automatic
Programming language(s): Python
Source code available: Will release when finished github
Links to relevant discussions (where appropriate): Wikipedia:Templates for discussion/Log/2021 May 6#Template:Olympic Channel
Edit period(s): One time run
Estimated number of pages affected: 5581
Namespace(s): Main
Exclusion compliant (Yes/No): Yes
Function details:
On transclusions of IOC profile:
- Search for a transclusion of Olympics.com profile. If one is found, delete the IOC profile transclusion (note that I plan on redirecting {{Olympic Channel}} to Olympics.com profile before this bot begins running. I haven’t taken a thorough look but I believe this can simply be done as they have identical content).
Get the ID by searching the article for the external link to the IOC profileGet the ID by parsing the template, and if that fails checking P3171 on the corresponding item page and make a HEAD request to https://www.olympic.org/$id, which will redirect to https://olympics.com/en/athletes/$newid. This is necessary because the id sometimes changes.- Extract the new id from the URL, and use it to replace the IOC profile with an Olympics.com profile. Note that
because this is done by looking at external links,this will work even if the id is populated by the Wikidata property (the bot, however, will use a parameter rather than Wikidata). Updated 23:20, 8 June 2023 (UTC) Another edit 01:40, 9 June 2023 (UTC)
Discussion
editApproved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Please do not mark these edits as minor, and ensure that a link to this BRFA is given in the edit summary, so that any issues can be better reported (URL links are something I always want as many eyes on as possible). Primefac (talk) 08:14, 8 June 2023 (UTC)[reply]
- Trial complete. [1] Snowmanonahoe (talk · contribs · typos) 01:29, 9 June 2023 (UTC)[reply]
- Approved. Primefac (talk) 10:51, 28 June 2023 (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 Wikipedia:Bots/Noticeboard.