neingeist
/
neinomaten
Archived
1
0
Fork 0

die seiten der bots ignorieren

master
neingeist 18 years ago
parent 2c7b447c0d
commit 3c98c09054

@ -1,6 +1,5 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
$:.unshift('vendor/ruby-mediawiki/lib') $:.unshift('vendor/ruby-mediawiki/lib')
$:.unshift('vendor/htree')
require 'mediawiki/dotfile' require 'mediawiki/dotfile'
@wiki = MediaWiki.dotfile(nil,'entropia') @wiki = MediaWiki.dotfile(nil,'entropia')
@putwhere = "Benutzer:Neinomat/" @putwhere = "Benutzer:Neinomat/"
@ -26,7 +25,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 && title != @putwhere + page if ! re.match(page_html) && title != page && title.to_s !~ /#{@putwhere}/
body += "* " + link_to(title) + "\n" body += "* " + link_to(title) + "\n"
count += 1 count += 1
end end