Sha256: 813b038176ebbfa7111a49f200a5d47f2ab268e97becaa6e768a0a59bfeb1cd9

Contents?: true

Size: 280 Bytes

Versions: 8

Compression:

Stored size: 280 Bytes

Contents

#!/usr/bin/env ruby
require './lib/media_wiki'

if ARGV.length <1
  raise "Syntax: delete_batch.rb <wiki-api-url> <startswith_pattern>"
end

rw = MediaWiki::Gateway.new(ARGV[0])
rw.list(ARGV[1]).each do |title|
  print "Deleting #{title}..."
  rw.delete(title)
end
print "Done."

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mediawiki-gateway-0.6.2 samples/delete_batch.rb
mediawiki-gateway-0.6.1 samples/delete_batch.rb
mediawiki-gateway-0.6.0 samples/delete_batch.rb
mediawiki-gateway-0.5.2 samples/delete_batch.rb
mediawiki-gateway-0.5.1 script/delete_batch.rb
mediawiki-gateway-0.5.0 script/delete_batch.rb
mediawiki-gateway-0.4.5 script/delete_batch.rb
mediawiki-gateway-0.4.4 script/delete_batch.rb