Wikipedia:Bots/Requests for approval/Hazard-Bot 22


 * 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 neutral vote.svg Request Expired.

Hazard-Bot 22
Operator:

Time filed: 23:04, Saturday June 1, 2013 (UTC)

Automatic, Supervised, or Manual: Automatic

Programming language(s): Python

Source code available: [//github.com/HazardSJ/English-Wikipedia/blob/master/wikivoyage.py GitHub]

Function overview:

Links to relevant discussions (where appropriate): bot request

Edit period(s): Occasional

Estimated number of pages affected: N/A

Exclusion compliant (Yes/No): Yes

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

Function details: The bot checks through a dump of the English Wikivoyage, and determines pages with a link (as well as the link itself) to the English Wikipedia (here). It will then attempt to add the link here, taking into consideration the following:  Hazard-SJ  ✈   23:04, 1 June 2013 (UTC)
 * It skips if wikivoyage or wikivoyage-inline is already on the page.
 * It skips if sister project links is already on the page and has a "voy" parameter. If there is no "voy" parameter, it adds the link there.
 * If none of the templates from above are on the page, it attempts to add wikivoyage to the beginning of the last section (only if either "external", "links", "other", "see", or "reference" is in the heading's title. If not, it adds a new section called "See also", and adds the template there, after verifying that the page isn't in Category:All article disambiguation pages.

Discussion
Other than it should be placed in the "external links" section instead of the "see also" section, support. Garion96 (talk) 19:33, 2 June 2013 (UTC) Just dropping a note that I've started to work on this.  Hazard-SJ  ✈   03:44, 16 June 2013 (UTC) I removed the section for adding the section from the code, mainly because it was messing up the bottom of the pages, ad it was difficult for a bot to find where exactly it should go with all the possibilities of templates, categories, in the "way". However, if there's a problem with this current way, I could attempt to rectify it.  Hazard-SJ  ✈   05:50, 28 August 2013 (UTC)
 * Comment - Manual of Style/Layout states that links to Wikimedia sister projects should generally appear in "External links", not under "See also". GoingBatty (talk) 14:08, 2 June 2013 (UTC)
 * * waits for Hazard to comment *  ·addshore·  talk to me! 19:12, 2 June 2013 (UTC)
 * * comments *  Hazard-SJ  ✈   23:01, 3 June 2013 (UTC)
 * Thanks for that, GoingBatty. I'll just undo [//github.com/HazardSJ/English-Wikipedia/commit/bfb7d2a16c0ff13ddb83db06614105a0089eca37 this] and make a few more changes specifically to improve this then. :D  Hazard-SJ  ✈   23:01, 3 June 2013 (UTC)
 * Code updated.  Hazard-SJ  ✈   00:05, 4 June 2013 (UTC)
 *  ·addshore·  talk to me! 07:49, 4 June 2013 (UTC)
 * I noticed a logic error in the code initially, and now, I have these edits. Also, I found an issue with the new sections sometimes being inserted at the wrong location. If I can't find any other solution, I'll resort to using standardizePageFooter from cosmetic_changes after inserting the section to fix that (or should I just run all cosmetic changes in all cases?).  Hazard-SJ  ✈   03:18, 5 June 2013 (UTC)
 * What is the list of all cosmetic changes in pywikipedia? Some of them will likely make some people complain so if you have to use any of them it may be best to only used standardizePageFooter  ·addshore·  talk to me! 08:23, 5 June 2013 (UTC)
 * Yes, it seems that the I'll have to use that cosmetic change (whether directly or indirectly). Also, the other cosmetic changes are (at least, most of them) fixSelfInterwiki (fixing interwikis to this site), cleanUpLinks, cleanUpSectionHeaders, putSpacesInLists, translateAndCapitalizeNamespaces, validXhtml (only fixes ), removeUselessSpaces, removeNonBreakingSpaceBeforePercent (since MediaWiki adds this space now), fixHtml (converts HTML to wiki-markup), fixReferences, fixStyle (converts prettytable to wikitable), fixTypo (not actual word changes, just like changing "ccm" to "cm³" and fixing the degree sign), and hyphenating ISBN numbers where possible.  Hazard-SJ  ✈   00:41, 7 June 2013 (UTC)
 * [//github.com/HazardSJ/English-Wikipedia/commit/f7df345876f607d47156f52f6e727de36b92f256 Code updated] to use standardizePageFooter.  Hazard-SJ  ✈   02:58, 7 June 2013 (UTC)
 *  ·addshore·  talk to me! 11:00, 8 June 2013 (UTC)
 * ([//en.wikipedia.org/w/index.php?title=Special:Contributions/Hazard-Bot&dir=prev&offset=20130611023105&target=Hazard-Bot edits])  Hazard-SJ  ✈   03:49, 11 June 2013 (UTC)
 * Would it be possible to change the bot so that it honors the order of sections per WP:ORDER? For example,  moved a stub template above categories,  added External links after the category,  added External links after a navigation template,  added External links after coord, and  added External links between categories.
 * Also, seems to have broken a reference.  Thanks!  GoingBatty (talk) 04:25, 11 June 2013 (UTC)
 * D Any updates?  ·addshore·  talk to me! 10:14, 22 June 2013 (UTC)
 * The delay is because I can't figure out any "simple" way to identify navigation templates.  Hazard-SJ  ✈   16:39, 22 June 2013 (UTC)
 * Could I have another trial please?  Hazard-SJ  ✈   22:37, 27 July 2013 (UTC)
 * Let's go again. — Earwig   talk  01:29, 1 August 2013 (UTC)
 * Hi there folks, where are we on that now? I am very interested as I am active on Wikivoyage and this bot could do such a good job instead of manual toiling, I am also the original "requester". PrinceGloria (talk) 04:47, 14 August 2013 (UTC)
 * [//en.wikipedia.org/wiki/Special:Contributions/Hazard-Bot?limit=50&offset=20130825033123 Form the new trial], I got 7 main problems, where the template was inserted before an infobox (I know why, that would be the line of code that attempts to find navboxes, which are very hard to determine since they don't a specific pattern (no similar categories or similar template transcluded for the most part)). I'll change that to be more specific, since we don't want these by the top of the page. The only risk is that Wikivoyage might in some cases be transcluded beneath a navbox, depending on if the script can't identify it as being a navbox. The good thing it that it works much better with WP:ORDER now.  Hazard-SJ  ✈   03:45, 25 August 2013 (UTC)
 * It doesn't seem to be adding the External Links header when the article lacks one, like it used to (1, 2, 3, 4, in addition to the top of the article ones). Is this intentional?:Jay8g [ V•T•E ] 18:18, 25 August 2013 (UTC)
 * I believe that is because the template follows the same rules as Template:Sister project links which states "Do not place this template in a section all by itself". It appears to be doing it correctly.  Del ♉ sion 23  (talk)  23:40, 26 August 2013 (UTC)


 * BAGAssistanceNeeded Hazard SJ 19:37, 6 September 2013 (UTC)

Given there were still issues in last trial. — HELL KNOWZ  ▎TALK 21:36, 12 September 2013 (UTC)
 * D Armbrust The Homunculus 23:50, 1 October 2013 (UTC)
 * I apologize for the delay, hopefully I can get to this soon. Hazard SJ 03:02, 6 October 2013 (UTC)


 * D More than twenty days passed, but still nothing happened. Armbrust The Homunculus 14:55, 31 October 2013 (UTC)
 * BotTrialComplete [//en.wikipedia.org/wiki/Special:Contributions/Hazard-Bot?limit=105&offset=20131103071357 Here it is]. As for issues, I found [//en.wikipedia.org/w/index.php?title=Baden-W%C3%BCrttemberg&diff=prev&oldid=579973629 this] which I can't explain, and a few coord issues in [//en.wikipedia.org/w/index.php?title=Balfour,_North_Dakota&diff=prev&oldid=579974362 this] and [//en.wikipedia.org/w/index.php?title=Balta,_North_Dakota&diff=prev&oldid=579974652 this]. For these, I believve the solution would be to only use coord that have title. Hazard SJ 07:21, 3 November 2013 (UTC)
 * Drop us a line when you're ready for another trial, and have an explanation for the duplication. Josh Parris 10:57, 5 November 2013 (UTC)
 * The coord issue should be fixed. Hazard <b style="color:#FFF">SJ</b> 01:33, 10 November 2013 (UTC)
 * Good; the duplication? Josh Parris 01:48, 10 November 2013 (UTC)

Operator has edited on four days in the last two months and has become unresponsive. I'm expiring this without prejudice; the operator is welcome to re-open. Josh Parris 07:40, 17 November 2013 (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.