From e41ddb477ab968a62475d2ade10ec74cbc671853 Mon Sep 17 00:00:00 2001 From: neingeist Date: Mon, 17 Apr 2006 19:13:11 +0000 Subject: [PATCH] We are mean. We delete your spam. --- examples/neinomat-fights-spam | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 examples/neinomat-fights-spam diff --git a/examples/neinomat-fights-spam b/examples/neinomat-fights-spam new file mode 100755 index 0000000..40ed82c --- /dev/null +++ b/examples/neinomat-fights-spam @@ -0,0 +1,18 @@ +#!/usr/bin/env ruby +$:.unshift('vendor/ruby-mediawiki/lib') +$:.unshift('vendor/htree') +require 'mediawiki/dotfile' +@wiki = MediaWiki.dotfile(nil,'entropia') + +@wiki.allpages.each do |title| + if @wiki.article(title).text.match("We are delicate. We do not delete your content.") + puts title + end + + # FIXME: We might better want to specify a namespace in MediaWiki::allpages + discussion_title = "Diskussion:#{title}" + + if @wiki.article(discussion_title).text.match("We are delicate. We do not delete your content.") + puts discussion_title + end +end