Wikivoyage talk:Script nominations
New rule proposed
After the crucial 2 admin level has been reached then whoever has got sysadmin access to the db should set the bot's identity as a bot, and announce that that has been done back on the nominations page.
The bot may be run only after this has been done, otherwise even a perfectly functioning script makes a big mess out of [[Special::Recentchanges]]. -- (WT-en) Mark 04:53, 30 Oct 2004 (EDT)
Requests for Scripts
I cannot find anywhere to request someone write a script or propose a suggestion for a useful script - should there be such a page or place to do this? If so, I would like to suggest that someone consider writing the following scripts:
- Links to WikiPedia Script for linking to the associated WikiPedia article. Should only link to a WikiPedia article of (effectively) the same name. As confirmation the Bot should first check that the subject article is linked from links in the Region, City or Other destination sections of a refering page that also has a WikiPedia link and that refering page's partner WikiPedia page also links to the target page. It should also check for page uniqueness and that the WikiPedia page is not a stub, disambiguation page, Vote for Deletion or otherwise suspect article.
- Links to Open Directory Script for linking to the associated Open Directory regional category page. Should only link to an Open Directory regional page where there is effectively the same name for the Open Directory category. As confirmation the Bot should check that first check that the subject article is linked from links in the Region, City or Other destination sections of a refering page that also has an Open Directory category link and that refering page's partner Open Directory category page also links to the target page, either directly or via a Localities list and the target Open Directory category is in the same regional hierachy but one level lower than the referer page's category.
- Disambiguation Page Identifier - Script for identifying disambiguation pages. Looks at all main namespace pages linked to the Template:Disamb page and confirms they are disambiguation pages that have a disambiguation notice on them. Adds any that do not appear into the Project:Links to disambiguating pages article
-- (WT-en) Huttite 21:35, 22 Jan 2005 (EST)
- The "link to Wikipedia" bot is on my TODO list, along with its evil twin the "link from Wikipedia" bot. But I'll be away for the next month so don't expect to see this until late Sep at the earliest. (WT-en) Jpatokal 21:55, 18 Aug 2005 (EDT)
Extending InterLangBot to other languages
We now have Wikivoyage available in 6 languages and new languages will appear soon. It becomes hard and heavy to maintain inter-language links between all versions. I think a bot would be great for that job. (WT-en) InterLangBot already exists but it doesn't match exactly this goal as it's running only between German and English versions. InterLangBot should read all articles available in english and check all inter-language links in the article and make links between all these versions. The problem is for pages who don't exist in the english version yet. What do you think about extending InterLangBot? in which way? --(WT-en) Quirk 08:49, 6 Jul 2005 (EDT)
- As far as I know the InterLangBot is not running even for the German version anymore... and yes, it should definitely be extended to cover all of Wikivoyage.
- Wikipedia has some fairly advanced bots doing this, maybe we should try to port one of them here? (WT-en) Jpatokal 21:02, 6 Jul 2005 (EDT)
- Agree. --(WT-en) Evan 00:28, 7 Jul 2005 (EDT)
Sample checking code for pywikipedia framework
I'm happy to report that (WT-ja) Kunibotto, the bad boy of the bot world, has joined the light side of the force. Here's the pywikipediabot code added to wikipedia.py needed to make it happen:
def allowed(self): # URL to your bot's Run page goes here path = self.get_address('%E5%88%A9%E7%94%A8%E8%80%85:Kunibotto/Run') txt = getUrl(self, path) txt = getUrl(self, path) ok1 = 'yes' in txt # URL to systemwide Run page goes here path = self.get_address('Wikivoyage:%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E3%81%AE%E5%9F%BA%E6%9C%AC%E6%96%B9%E9%87%9D/Run') txt = getUrl(self, path) ok2 = 'yes' in txt output(u'User-run: %s System-run: %s' %(ok1,ok2)) return (ok1 and ok2)
Note that the bizarre URLs above are because this runs in the Japanese Wikivoyage and needs to deal with Unicode, for English you can replace them with "User" and "Script_policy" respectively. And the actual check can then be done inside your robot like so:
# check if blocked allowed = self.site.allowed() if False: sys.exit("Bot blocked!");
Automated upload bots 101
For posterity, here's what I needed to do to automatically upload country stubs to the Japanese Wikivoyage.
- Write up a table of all countries in Japanese and English.
- Write bot number one to snarf maps and flags off the CIA World Factbook and upload them all.
- Write bot number two to scrape the map/flag code for each country from the English Wikivoyage.
- Write bot number three to scrape country data from the Japanese Wikipedia. After a couple of abortive attempts with regexps, I gave up and went with a real HTML parse, namely Beautiful Soup which does a good job. I also needed to write a converter to swap between raw UTF8 and the HTML-escaped flavor used by Mediawiki in URLs.
- Write bot number four to take the data compiled by the previous bots, inject it into a template, and upload that template to the Japanese Wikivoyage.
And oh yes, as bonuses, the remote terminal I used is incapable of displaying Japanese and I didn't know Python at all before I embarked on this.
The last of these bots is the most reusable of the bunch, as it can be used for generating pretty much any time of automated content, so I plan to clean up it and submit it into the pywikipedia CVS. (WT-en) Jpatokal 21:25, 16 Aug 2005 (EDT)
- → (WT-en) post.py (documentation) -- pywikipediabot script for uploading skeleton articles (WT-en) Jpatokal 01:48, 23 June 2006 (EDT)
Should this process be moved to Shared? Eg. StatScript actually runs on Shared now, not en. (WT-en) Jpatokal 02:11, 1 November 2006 (EST)
- I'd rather it did. Most bots are useful across multiple language versions, and Shared is where all language versions (are supposed to) coordinate activities. For most language versions, I think approval on Shared, and the participation of a bureacrat from the individual language version, should be enough to allow the bot flags to be put in place. --(WT-en) Peter Talk 15:51, 19 August 2009 (EDT)
- Any more opinions on this? If not, I'm going to plunge forward with this. (WT-en) Jpatokal 02:24, 4 September 2009 (EDT)
If 2 administrators voice their support for the script within 7 days, and none oppose it in that period, the script can be run.
- Agreed - this policy was crafted when most bot frameworks were buggier and the potential for harm was higher. How about saying a bot may be approved once two administrators have supported the nomination, provided there are no unresolved objections? -- Ryan • (talk) • 20:59, 4 January 2013 (UTC)
- Two admins are good to have as that ensures that someone is aware of the 'bot who can block it (and rollback changes relatively quickly) if it malfunctions. Whether the proposal was made a day ago, last month, last year really doesn't make a difference. Lose the seven days, keep the rest should work fine. K7L (talk) 21:12, 4 January 2013 (UTC)
Per WV:Pub#Automatic archiving, this page was identified as a candidate for auto-archiving using User:ArchiverBot, so I've set this up to automatically archive threads that have been inactive for four weeks. Please revert me if there are objections.-- Ryan • (talk) • 01:08, 3 December 2014 (UTC)