Wikivoyage:Script nominations

From Wikivoyage
Jump to navigation Jump to 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.


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. (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)? (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? (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...) (talk) 15:25, 3 March 2018 (UTC)
By "some admin" I presume that means a bureaucrat. K7L (talk) 22:00, 3 March 2018 (UTC)
  • Guys, I'm not sure I'll be able to finish the 1st part (listings/markers + region lists) too soon (likely weeks from now), so I suggest to give the bot the bot flag and I'll make it perform the 2nd task (wikipedia -> wikidata)... And once I have finished the 1st task, I'll get here to get feedback? I guess in the end, this whole bot thing is based on "trust" anyway? (talk) 19:14, 24 April 2018 (UTC)
Was the question about listings vs. markers ever resolved? Ikan Kekek (talk) 19:18, 24 April 2018 (UTC)
Not to my knowledge - it probably makes sense to first provide some samples, so we can continue it... In the meantime I came to terms with both possible outcomes (I really just want to make the region pages nicer, if easily possible), and don't care that much regarding markers/listings currently, so... :) (talk) 19:47, 24 April 2018 (UTC)
Well, it looks like there's plenty of support for this bot. Does the bot still need approval by a Bureaucrat? It looks like it was made an Autopatroller by an Admin. Is that good enough for your purposes? Ikan Kekek (talk) 23:31, 24 April 2018 (UTC)
Without the bot flag/group, the changes flood the "recent changes" log for the few hours it runs, even if it's autopatroller... (talk) 05:23, 25 April 2018 (UTC)
OK, I approved it as a bot. Let me know if I can help in any other way. Ikan Kekek (talk) 05:54, 25 April 2018 (UTC)

──────────────────────────────────────────────────────────────────────────────────────────────────── Hi all, apologies for joining this discussion so late, but I only found it now by accident. I have a few comments on the proposal:

  • Regarding geo coordinates on WV region pages: This is a great idea. Before letting the bot loose, could I propose think about a further development of that: (almost) all the information required for a WV city one-liner is given somehwere on its page (e.g. in the "geo" template - that's why the bot would work). It would be much better, if this information would be extracted dynamically (and not statically as proposed now) from these pages, so that if someone changes the info there (e.g. geo coordinates, or link, or name/transcription in the native language), it is automatically changed everywhere else. If this is possible, something like "{{oneliner|Kilkenny}}", which would dynamically extract all the relevant info, would be enough to put on these pages.
    If this is possible, then I would suggest something on top of that: on each WV city page, a "one-liner" summary for that WV city could be defined (e.g. with "{{onelinersummary|Attractive medieval town, known as the Marble City and home to the Cat Laughs Comedy Festival, held annually in early June.}} for "Kilkenny"). That information could then also be extracted dynamically, and would not only benefit the WV region articles (under "Cities", "Other destinations"), but could also be reused in the "Go next" sections. The "oneliner" template should also provide the possibility of overwriting or adding to the automatically extracted values.
  • Regarding testing a bot: I think this should be done in a sandbox, e.g. by copying a selection of pages currently using different styles. Such tests should to my mind not be done on the live WV pages. But if you have enough good experience with testing it directly on the live WV pages, then go for it.
  • Regarding automatically overwriting content: I want to emphasize that this should not be done (without discussing the consequences). I encountered cases where correct geo coordinates were overwritten with values from wikidata, that were either completely wrong, or placed at a position not very useful for travelers. This was done by a user who seemed to mechanically go through many listings, which is almost like a bot.

Thanks for considering the above points. Xsobev (talk) 12:04, 25 April 2018 (UTC)

Instead of copying stuff, I used the new {{marker}} functionality to autofetch missing data from wikidata... So the above is now mostly a non-concern .-) I decided to not to anything with the short-descriptions for now, as it seems to be a sensitive topic... (talk) 17:50, 24 June 2018 (UTC)

Guys, the script seems to do +- what I imagined it should regarding the region preparation. Check the changes. In the end, I'll have to supervise the script, as every other region page has something special and causes the it to fail :) But you can speak up and say something, if you don't like the output (but I didn't do anything controversial, I even used markers instead of listings ;)). Otherwise I'll run it more batch-ly... (talk) 17:50, 24 June 2018 (UTC)