From 515e50fb9780dcfa2e15563e318fb9bd5feffb32 Mon Sep 17 00:00:00 2001 From: neingeist Date: Sun, 7 May 2006 17:40:39 +0000 Subject: [PATCH] spam im wiki speichern --- examples/neinomat-fights-spam | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/neinomat-fights-spam b/examples/neinomat-fights-spam index 40ed82c..cad666c 100755 --- a/examples/neinomat-fights-spam +++ b/examples/neinomat-fights-spam @@ -3,16 +3,22 @@ $:.unshift('vendor/ruby-mediawiki/lib') $:.unshift('vendor/htree') require 'mediawiki/dotfile' @wiki = MediaWiki.dotfile(nil,'entropia') +@putwhere = "Benutzer:Neinomat/" +@body = "" @wiki.allpages.each do |title| if @wiki.article(title).text.match("We are delicate. We do not delete your content.") - puts title + @body += "* [[#{title}]]\n" 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 + @body += "* [[#{discussion_title}]]\n" end end + +a = @wiki.article(@putwhere + "Spam-Artikel") +a.text = @body +a.submit("fnord")