Wikipedia:Bots/Requests for approval/PotatoBot 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 Symbol keep vote.svg Approved.

PotatoBot 2
Operator:

Automatic or Manually assisted: Automatic, unsupervised

Programming language(s): Python, PyWikipedia

Source code available: yes

Function overview: Creates redirects from ISO 639 codes to language articles (see Category:Redirects from ISO 639)

Links to relevant discussions (where appropriate): User talk:Anypodetos, Wikipedia talk:WikiProject Languages

Edit period(s): One time run; possibly later runs if necessary/requested

Estimated number of pages affected: Less than 7700 redirects (the number of ISO 639-3 codes)

Exclusion compliant (Y/N): No (bot affects only redirects, which are unlikely to have an exclusion template)

Already has a bot flag (Y/N): Yes

Function details: Creates redirects of the type ISO 639:aaa → Ghotuo language. The codes and language names are obtained from the lists ISO 639:a etc. Existing redirects are checked for the presence of the template R from ISO 639 (which is added if necessary) and for target language (which the bot doesn't fix automatically, but only writes to a log for manual inspection). Another log is created for target language pages that don't exist.

Discussion
If the target language page doesn't exist, I presume it won't be created. If so, will a redirect to a non-existent page be created? Josh Parris 10:07, 15 May 2010 (UTC)
 * No. If the target page doesn't exist, the redirect is not created. Such cases are only logged to a page in the bot's user space. --ἀνυπόδητος (talk) 11:35, 15 May 2010 (UTC)

No objections, so let's trial things. Josh Parris 02:29, 18 May 2010 (UTC)
 * BotTrialComplete Rephrased the edit summary for new redirects and did some other tweaking, but I encountered no serious problems. --ἀνυπόδητος (talk) 17:51, 20 May 2010 (UTC)

The bot seems to be creating double-redirects You're going to need to avoid that. Josh Parris 07:20, 21 May 2010 (UTC)
 * http://en.wikipedia.org/w/index.php?title=ISO_639:aas&action=history
 * http://en.wikipedia.org/w/index.php?title=ISO_639:abo&action=history
 * http://en.wikipedia.org/w/index.php?title=ISO_639:abs&action=history
 * http://en.wikipedia.org/w/index.php?title=ISO_639:acc&action=history
 * Sorry, I wasn't aware that the bot was required to do that, since Xqbot is taking care of double redirects. I will implement a fix tomorrow. What shall I do then, run another dozen trial edits or just inform you that the fix is ready? --ἀνυπόδητος (talk) 09:07, 21 May 2010 (UTC)

Yes, go ahead and run another 20 edits once you've got that sorted. Josh Parris 09:40, 21 May 2010 (UTC)
 * http://en.wikipedia.org/w/index.php?title=ISO_639:acn&redirect=no is an example of the fix working: it would have redirected to Achang language instead of Ngac'ang language. --ἀνυπόδητος (talk) 10:47, 22 May 2010 (UTC)

Looks good. Josh Parris 08:01, 23 May 2010 (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.