neingeist
/
neinomaten
Archived
1
0
Fork 0

Interwiki foo

master
neingeist 19 years ago
parent 515e50fb97
commit dea4fb4b91

@ -0,0 +1,23 @@
#!/usr/bin/env ruby
$:.unshift('vendor/ruby-mediawiki/lib')
$:.unshift('vendor/htree')
require 'mediawiki/dotfile'
@wiki = MediaWiki.dotfile(nil,'entropia')
@putwhere = "Benutzer:Neinomat/"
@body = ""
@wiki.allpages.each do |title|
MediaWiki::logger.debug("Checking #{title}")
text = @wiki.article(title).text
s = text.scan(/^.*wikipedia.org.*$/s)
if s != []
@body += "* [[#{title}]]\n"
s.each do |m|
@body += " <pre><nowiki>#{m}</nowiki></pre>\n"
end
end
end
a = @wiki.article(@putwhere + "Interwiki links that need to be interwikified")
a.text = @body
a.submit("fnord")