I'm not sure if this is the right place to ask, but I've just written a bot, and Wikipedia policy says it should be approved before I set it loose.
I recently moved [[Brisbane, Queensland]] to [[Brisbane]], and then started fixing the links to those pages. I got through about 100 pages and I wasn't even a third of the way there, and I though "it would be easier to just write a bot". So I did.
The bot takes a list of article titles, and runs a Perl search and replace operation on the HTML escaped wikitext. The idea is to manually extract the list of titles from Special:Whatlinkshere, and then replace all links to the old page with links to the new page.
It will be running from username "Timbot". I've tested it on test.wikipedia.org. It runs in "trickle" mode, i.e. like this:
while (<ARTICLES>) { chomp($_); DoPage($_); if (time - $lastTime < $delay) { sleep($delay - $lastTime + $time); } $lastTime = time; }
I'm open to suggestions as to the setting of $delay. If anyone wants to see the rest of the code, I'll send it by private email.
-- Tim Starling.
_________________________________________________________________ MSN Instant Messenger now available on Australian mobile phones. Go to http://ninemsn.com.au/mobilecentral/hotmail_messenger.asp
On 3/28/03 8:15 PM, "Tim Starling" ts4294967296@hotmail.com wrote:
I'm not sure if this is the right place to ask, but I've just written a bot, and Wikipedia policy says it should be approved before I set it loose.
I recently moved [[Brisbane, Queensland]] to [[Brisbane]], and then started fixing the links to those pages. I got through about 100 pages and I wasn't even a third of the way there, and I though "it would be easier to just write a bot". So I did.
The bot takes a list of article titles, and runs a Perl search and replace operation on the HTML escaped wikitext. The idea is to manually extract the list of titles from Special:Whatlinkshere, and then replace all links to the old page with links to the new page.
It will be running from username "Timbot". I've tested it on test.wikipedia.org. It runs in "trickle" mode, i.e. like this:
Is it just for Brisbane, Queensland?
An easier thing to do might be to request the change be made from the backend instead.
(Tim Starling ts4294967296@hotmail.com): I'm not sure if this is the right place to ask, but I've just written a bot, and Wikipedia policy says it should be approved before I set it loose.
Looks like you've done you're homework. To run the bot the first time, I'd set the delay to something nice and long like 30 seconds, and run it at some off-peak hour, and go to RecentChanges and check its work while it runs.
But if this is something that will need to be done a lot, then we probably should look at doing it directly to the backend database, because that will use less server bandwidth and not clutter up the recent changes and the article histories.
And yes, I'd like to see the code before you unleash it.
From: "Tim Starling" ts4294967296@hotmail.com Reply-To: wikitech-l@wikipedia.org Date: Sat, 29 Mar 2003 12:15:51 +1100 To: wikitech-l@wikipedia.org Subject: [Wikitech-l] Bot approval request
"I'm open to suggestions as to the setting of $delay. If anyone wants to see the rest of the code, I'll send it by private email.
-- Tim Starling."
What's up with this guy?
Fred
wikitech-l@lists.wikimedia.org