fsdfasdfawesduj235
This commit is contained in:
parent
6ca570e8fc
commit
d1cdd63f8f
1 changed files with 3 additions and 2 deletions
|
@ -3,6 +3,7 @@ $:.unshift('vendor/ruby-mediawiki/lib')
|
||||||
$:.unshift('vendor/htree')
|
$:.unshift('vendor/htree')
|
||||||
require 'mediawiki/dotfile'
|
require 'mediawiki/dotfile'
|
||||||
@wiki = MediaWiki.dotfile(nil,'entropia')
|
@wiki = MediaWiki.dotfile(nil,'entropia')
|
||||||
|
@putwhere = "Benutzer:Neinomat/"
|
||||||
|
|
||||||
def link_to (title)
|
def link_to (title)
|
||||||
if /^(Category|Kategorie):/.match(title)
|
if /^(Category|Kategorie):/.match(title)
|
||||||
|
@ -25,7 +26,7 @@ def check_page_against_category (page, category)
|
||||||
re = Regexp.new("(" + Regexp.escape("title=") + "(\"|')" +
|
re = Regexp.new("(" + Regexp.escape("title=") + "(\"|')" +
|
||||||
Regexp.escape(CGI.escapeHTML(title)) + "(\"|')" +
|
Regexp.escape(CGI.escapeHTML(title)) + "(\"|')" +
|
||||||
"|>" + Regexp.escape(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"
|
body += "* " + link_to(title) + "\n"
|
||||||
count += 1
|
count += 1
|
||||||
end
|
end
|
||||||
|
@ -33,7 +34,7 @@ def check_page_against_category (page, category)
|
||||||
|
|
||||||
body += "\n#{count} Artikel.\n"
|
body += "\n#{count} Artikel.\n"
|
||||||
|
|
||||||
a = @wiki.article("Benutzer:Neinomat/#{page}")
|
a = @wiki.article(@putwhere + page)
|
||||||
a.text = body
|
a.text = body
|
||||||
a.submit("wiki ex machina")
|
a.submit("wiki ex machina")
|
||||||
end
|
end
|
||||||
|
|
Reference in a new issue