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/examples/neinomat-fights-spam

24 lines
687 B
Text
Raw Normal View History

2006-04-17 19:13:11 +00:00
#!/usr/bin/env ruby
$:.unshift('vendor/ruby-mediawiki/lib')
require 'mediawiki/dotfile'
@wiki = MediaWiki.dotfile(nil,'entropia')
2006-05-07 17:40:39 +00:00
@putwhere = "Benutzer:Neinomat/"
@body = ""
2006-04-17 19:13:11 +00:00
@wiki.allpages.each do |title|
if @wiki.article(title).text.match("We are delicate. We do not delete your content.")
2006-05-07 17:40:39 +00:00
@body += "* [[#{title}]]\n"
2006-04-17 19:13:11 +00:00
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.")
2006-05-07 17:40:39 +00:00
@body += "* [[#{discussion_title}]]\n"
2006-04-17 19:13:11 +00:00
end
end
2006-05-07 17:40:39 +00:00
a = @wiki.article(@putwhere + "Spam-Artikel")
a.text = @body
a.submit("fnord")