1
0
Fork 0
This repository has been archived on 2019-12-19. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
neinomaten/neinomat-interwiki

23 lines
597 B
Text
Raw Normal View History

2006-06-21 16:50:41 +00:00
#!/usr/bin/env ruby
$:.unshift('vendor/ruby-mediawiki/lib')
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
2006-06-24 18:21:44 +00:00
s = text.scan(/^.*(?:wikipedia.org|ka.stadtwiki.net).*$/s)
2006-06-21 16:50:41 +00:00
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")