spam im wiki speichern
This commit is contained in:
		
							parent
							
								
									5333fa06f5
								
							
						
					
					
						commit
						515e50fb97
					
				
					 1 changed files with 8 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -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")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue