You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
640 B
Ruby
24 lines
640 B
Ruby
#!/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://www.entropia.de/wiki/")
|
|
b.login(ARGV[0], ARGV[1])
|
|
|
|
body = ""
|
|
template = "Vorlage:Radio Chaotica-Sendung"
|
|
b.get_what_uses_template(template).each do |page|
|
|
if erste_sendung = b.parse_template(page, template)["erste_sendung"]
|
|
datum = erste_sendung.gsub(/\s*um\s*\d+:\d+$/,"")
|
|
body += "* " + datum + " [[" + page + "]]\n"
|
|
else
|
|
$stderr.print(page, ": erste_sendung nicht gesetzt")
|
|
end
|
|
end
|
|
|
|
b.edit("Benutzer:Neingeist/Radio Chaotica-Liste", body, "Test")
|