neingeist
/
neinomaten
Archived
1
0
Fork 0
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
neinomaten/neinomat-uebersichten

26 lines
733 B
Ruby

#!/usr/bin/env ruby
require 'mediawikibotchecker'
if ARGV.size() != 2
$stderr.print($0 + " <wiki-user> <wiki-password>\n")
exit(1)
end
#----------------------------------------------------------------------------
def fasel (page, category)
b = WikiChecker.new("http://entropia.de/wiki/")
b.login(ARGV[0], ARGV[1])
fasel_title = "Benutzer:Neinomat/#{page}"
body_old = b.get_raw(fasel_title)
body_new = b.category_checker(page, category).gsub(/\n*$/sm, "")
b.edit(fasel_title, body_new, "wiki ex machina") unless body_old == body_new
end
fasel("Übersicht über Vorträge", "Kategorie:Vorträge")
fasel("Übersicht über Projekte", "Kategorie:Projekte")
fasel("Entropia:FIXME", "Kategorie:FIXME")