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/mediawikibotchecker.rb

20 lines
513 B
Ruby
Raw Normal View History

2005-09-30 14:19:50 +00:00
require 'mediawikibot'
class WikiChecker < MediaWikiBot::WikiBot
def category_checker (page, category)
body = "== #{page} ==\n\n"
body += "[[Category:FIXME]]\n\n"
body += "Unter [[#{page}]] fehlen folgende Artikel aus [[:#{category}]]:\n\n"
projekte = get_raw(page)
get_category_articles(category).each do |title|
re = Regexp.new("\\\[\\\[" + title)
if ! re.match(projekte) && title != page
body += "* [[" + title + "]]\n"
end
end
return body
end
end