1
0
Fork 0
This repository has been archived on 2019-12-19. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
neinomaten/examples/fix-links

17 lines
457 B
Text
Raw Normal View History

2005-10-14 01:17:16 +00:00
#!/usr/bin/env ruby
require '../mediawikibot'
if ARGV.size() != 2
$stderr.print($0 + " <wiki-user> <wiki-password>\n")
exit(1)
end
#----------------------------------------------------------------------------
b = MediaWikiBot::WikiBot.new("http://entropia.de/wiki/")
b.login(ARGV[0], ARGV[1])
old = b.get_raw("RoboRally")
new = old.gsub(/\[#reg ([^|]*?)\]/i, '[[#Gesperrte Register|\1]]')
b.edit("RoboRally", new, "Kaputte interne Links repariert")