You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
603 B
Plaintext
24 lines
603 B
Plaintext
19 years ago
|
#!/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")
|