Sha256: 96ff4eb099dd8661600b77fe794bfe54a8ce9cf51f3a4c3b89c8ebf61a88cb0e
Contents?: true
Size: 337 Bytes
Versions: 8
Compression:
Stored size: 337 Bytes
Contents
require './lib/media_wiki' config = MediaWiki::Config.new ARGV mw = MediaWiki::Gateway.new(config.url, { :loglevel => Logger::DEBUG } ) mw.login(config.user, config.pw) ARGF.readlines.each do |image| image.strip! unless File.exist? image File.open(image, 'w') do |file| file.write(mw.download(image)) end end end
Version data entries
8 entries across 8 versions & 1 rubygems