|
|
|
@ -3,6 +3,7 @@ $:.unshift('vendor/ruby-mediawiki/lib')
|
|
|
|
|
$:.unshift('vendor/htree')
|
|
|
|
|
require 'mediawiki/dotfile'
|
|
|
|
|
@wiki = MediaWiki.dotfile(nil,'entropia')
|
|
|
|
|
@putwhere = "Benutzer:Neinomat/"
|
|
|
|
|
|
|
|
|
|
def link_to (title)
|
|
|
|
|
if /^(Category|Kategorie):/.match(title)
|
|
|
|
@ -25,7 +26,7 @@ def check_page_against_category (page, category)
|
|
|
|
|
re = Regexp.new("(" + Regexp.escape("title=") + "(\"|')" +
|
|
|
|
|
Regexp.escape(CGI.escapeHTML(title)) + "(\"|')" +
|
|
|
|
|
"|>" + Regexp.escape(title) + "<)")
|
|
|
|
|
if ! re.match(page_html) && title != page
|
|
|
|
|
if ! re.match(page_html) && title != page && title != @putwhere + page
|
|
|
|
|
body += "* " + link_to(title) + "\n"
|
|
|
|
|
count += 1
|
|
|
|
|
end
|
|
|
|
@ -33,7 +34,7 @@ def check_page_against_category (page, category)
|
|
|
|
|
|
|
|
|
|
body += "\n#{count} Artikel.\n"
|
|
|
|
|
|
|
|
|
|
a = @wiki.article("Benutzer:Neinomat/#{page}")
|
|
|
|
|
a = @wiki.article(@putwhere + page)
|
|
|
|
|
a.text = body
|
|
|
|
|
a.submit("wiki ex machina")
|
|
|
|
|
end
|
|
|
|
|