Wikivoyage:Script nominations

From Wikivoyage
Jump to: navigation, search


According to the Wikivoyage script policy, scripts have to be approved by the Wikivoyage administrators. To create a script that runs against Wikivoyage, post the name and reason for the script beneath the line below.

Explain why we need the script, why it can't be done by hand, and what the script will do. If 2 administrators voice their support for the script and there are no unresolved objections, the script can be run with a bot flag. If objections arise later, the bot flag can be undone.

Scripts that have passed through this process can be found in Project:script nominations/Archive. The user page for any approved bot should include {{bot}} to indicate the wiki user responsible for operating the bot; a list of all active bots will then appear in Category:Wikivoyage bots.

NOTE: you must apply for approval on each language version of Wikivoyage. Approval on this page only allows you to run a bot on Wikivoyage in English.


Nominations[edit]

User:Wrh2Bot - Flag broken external links[edit]

I'd like to tag broken external links with {{dead link}}. By default this tag will not be visible to users who have not enabled the ErrorHighlighter gadget from Special:Preferences, but users who have enabled that gadget will see a "dead link" note next to the invalid link, making it very easy to find and fix bad links in articles. Pages with broken links are also added to Category:Articles with dead external links‎‎. See this edit to New York City and this edit to Chicago for examples of what the bot would be doing. Assuming two people support this bot my plan is to initially run the bot slowly and manually review all edits it makes to ensure that there are no false positives. Also of note, the way I've set up the bot is that if a link isn't obviously broken - for example, if the site returns "server error" or some other indication of a potentially temporary problem - the bot won't flag the link in order to avoid false positives. -- Ryan • (talk) • 03:44, 7 April 2016 (UTC)

Update: I've run the bot against all star articles, so Category:Articles with dead external links‎‎ now contains a number of articles that can be reviewed to see how the bot will work. It broke one link in the process, so I'll need to figure out a fix, but the link in question was a mess to start with - search for "Golders Hill Park" in the following diff: Special:Diff/2909329/2968987. -- Ryan • (talk) • 00:11, 8 April 2016 (UTC)

Support - This is a great tool, checking manually is a very long job. Broken links can highlight closed businesses or just that web addresses have changed. This will help us increase the quality of articles, making it more useful to readers and increase our search engine rankings. --Traveler100 (talk) 07:43, 7 April 2016 (UTC)
Support. Would like to see it check links twice a few days apart, before updating. A similar tool in OSM produces a remarkable amount of false positives. --Inas (talk) 08:50, 7 April 2016 (UTC)
The current version of the bot is designed to only flag links where the server explicitly returns 404 (file not found) or if the DNS lookup returns "unknown host" (indicating that there is no longer a website at that domain). I think that should eliminate false positives due to issues that would otherwise be resolved by checking twice, although it could also miss some invalid links - for example, in the Santa Monica article a link was set to "https" but the site only supported "http", and the bot doesn't currently flag that scenario (I manually fixed it in this edit after noticing the error in the bot output on my laptop). In addition, if the bot is re-run against an article it will remove all existing {{dead link}} tags and only re-tag articles that fail, so if a link is tagged as broken due to a temporary problem with the external site it should be un-tagged the next time the bot runs. For the first iteration hopefully that's OK, and I could then look to do something like storing failure history for edge cases and flagging more difficult links after multiple failures for a future enhancement. Does that seem reasonable? -- Ryan • (talk) • 14:51, 7 April 2016 (UTC)
It does. --Inas (talk) 02:18, 8 April 2016 (UTC)
Great idea. Support. Pashley (talk) 09:17, 8 April 2016 (UTC)
Could it indicate whether the web site is not found or it got a 404? This would be helpful to anyone trying to fix it, though it is not essential since the fixer will of course test the link. Pashley (talk) 08:42, 22 February 2018 (UTC)

User:AndreeBot - improve listings/regionlists[edit]

Currently, many areas are really basic - like Buryatia, What I'd like to do is try to automatically gather the geolocs from the referred articles and create listing|type=city, so that we can later easily show those on map (and visually navigate through the articles). Similarly, I'd like to convert region lists to use templates (e.g. Middle Hills). I already have some basic scripts for this, so I want to avoid flooding the 'recent changes' wall.

Another task is adding wikidata links to the listings that already have wikipedia link. In many cases, these listings have no image or location, or url - these could be relatively easily added as well. Andree.sk (talk) 18:55, 21 February 2018 (UTC)

Support - I was thinking about adding lat/longs to cities on region articles manually but using a bot is obviously a much idea. Gizza (roam) 02:19, 22 February 2018 (UTC)
Support - I imagine there might be some problems, but nothing awful & it is basically a fine idea. Pashley (talk) 08:28, 22 February 2018 (UTC)
Support - as long as adding and not overriding information. Maybe run a random sample of about 20 first so can see what is created. --Traveler100 (talk) 09:07, 22 February 2018 (UTC)
Support the Wikidata proposal (see list of target articles, at Category:Listing with Wikipedia link but not Wikidata link). No view on the other. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 16:37, 22 February 2018 (UTC)
I think these sound like very good ideas. I like Traveler100's suggestion of running a sample of a few pages so we can see exactly what the results look like. —Granger (talk · contribs) 00:46, 23 February 2018 (UTC)
Support - I think this is a great idea. I have just one question, why do you use listings and not markers? I think listings might look a bit weird in some cases, such as the example you posted on the user page Evenkia where we have just the name of the city followed by a period, which looks a bit odd. See for instance Île-de-France for an example where markers where used. Drat70 (talk) 04:52, 23 February 2018 (UTC)
I think semantically, listing is the right thing there - as ideally all those thing should (IMO) contain some short description, links to wikipedia and such - and should be editable by the wikivoyagers... Perhaps we should instead improve the listing template to not generate the period if there are not data in the listing (apart from loc+wiki links)? Andree.sk (talk) 07:38, 23 February 2018 (UTC)
I agree with Drat70—cities with one-liner descriptions should use marker templates rather than listing templates. I don't think I've ever seen a region article that used listing templates for its cities, and I don't see any reason to include the Wikipedia and Wikidata links for them—if readers want to read about the city, they can click on the wikilink to go to our article about it. —Granger (talk · contribs) 14:29, 23 February 2018 (UTC)
My idea is to eventually have nice maps with clickable content, like Northern Hungary (see first 3 cities), mixed with clickable regions like Madrid. There are surely many ways to do it, but I'd say keeping wikidata references alongside the listings is the best way to keep it consistent in the future. In the end, volunteers can transform it further into Berne Region-like region lists, if there's nothing much to be said about the cities... In any case, I think this is not the right place for this discussion. listing|type=city can be transformed into anything else later on, depending on outcome of that discussion? Andree.sk (talk) 15:53, 23 February 2018 (UTC)
I agree that this is not the right place for this discussion. The existing practice is to use marker templates with one-liner descriptions; if you think we should change that practice, maybe the pub would be the right place to bring up that idea. —Granger (talk · contribs) 19:23, 23 February 2018 (UTC)
OK sample size is large enough for first set of comments. --Traveler100 (talk) 12:09, 3 March 2018 (UTC)
  • Could you get the user id set to be a bot user so easier to filter out edits from watchlist.
I'd say this has to be done by some admin (assign bot rights to the bot). I tried setting the bot flag in the pywikibot framework, but it didn't do any change... I may be missing something, though.
  • Would it be possible to add the wikidata parameter next to the wikipedia parameter instead of at the end of the list?
Done, mwparserfromhell only allows prepending before [wikipedia] parameter, so that's going to be done...
  • Bot should also stop when entry made to talk page.
Done, forgot about it (but in the end the bot requires some manual involvement right now, anyway...) Andree.sk (talk) 15:25, 3 March 2018 (UTC)
By "some admin" I presume that means a bureaucrat. K7L (talk) 22:00, 3 March 2018 (UTC)