neingeist
/
neinomaten
Archived
1
0
Fork 0
master
neingeist 19 years ago
parent 70e56b824b
commit 20823077c6

@ -0,0 +1,5 @@
#!/bin/sh
./neinomat-vortraege $*
./neinomat-projekte $*
./neinomat-radio-chaotica $*
./neinomat-termine $*

@ -186,7 +186,7 @@ class WikiBot
articles = [] articles = []
category_page = @client.get_content(@wiki + category) category_page = @client.get_content(@wiki + url_encode(category))
category_page.scan(/<li><a href=".*?" title="(.*?)"/) do |m| category_page.scan(/<li><a href=".*?" title="(.*?)"/) do |m|
title = m[0] title = m[0]
articles.push(title) articles.push(title)

@ -8,7 +8,7 @@ class WikiChecker < MediaWikiBot::WikiBot
projekte = get_raw(page) projekte = get_raw(page)
get_category_articles(category).each do |title| get_category_articles(category).each do |title|
re = Regexp.new("\\\[\\\[" + title) re = Regexp.new(Regexp.escape("[[" + title))
if ! re.match(projekte) && title != page if ! re.match(projekte) && title != page
body += "* [[" + title + "]]\n" body += "* [[" + title + "]]\n"
end end

@ -0,0 +1,18 @@
#!/usr/bin/env ruby
require 'mediawikibotchecker'
if ARGV.size() != 2
$stderr.print($0 + " <wiki-user> <wiki-password>\n")
exit(1)
end
#----------------------------------------------------------------------------
b = WikiChecker.new("http://www.entropia.de/wiki/")
b.login(ARGV[0], ARGV[1])
page = "Übersicht über Vorträge"
category = "Kategorie:Vorträge"
body = b.category_checker(page, category)
b.edit("Benutzer:Neinomat/#{page}", body, "wiki ex machina")