diff --git a/mediawikibot.rb b/mediawikibot.rb index ed9597a..b0bb949 100755 --- a/mediawikibot.rb +++ b/mediawikibot.rb @@ -179,5 +179,21 @@ class WikiBot return fields end + + def get_category_articles(category) + # FIXME: There seems to be no MediaWiki API? Let's scrape it up from + # HTML for now. + + articles = [] + + category_page = @client.get_content(@wiki + category) + category_page.scan(/
  • \n") + exit(1) +end + +#---------------------------------------------------------------------------- + +b = WikiChecker.new("http://www.entropia.de/wiki/") +b.login(ARGV[0], ARGV[1]) + +page = "Projekte" +category = "Category:Projekte" +body = b.category_checker(page, category) + +b.edit("Benutzer:Neinomat/#{page}", body, "wiki ex machina")