#!/usr/bin/ruby require './Wiki.rb' wiki = Wiki.new list = wiki.get_list()['allpages'] for page in list do page_text = wiki.get_text(page['title']).body if page_text.match(/\[\[Category\:Jokes\]\]/) and not page_text.match(//) then page_text = page_text + "\n\n" wiki.create_page(page['title'], page_text) end end