Sha256: eb40f4d0574e1654c1b89adc399255e190cdfeaf64e3e20066df8b7c626435de

Contents?: true

Size: 447 Bytes

Versions: 11

Compression:

Stored size: 447 Bytes

Contents

#!/usr/bin/env ruby
#
# Sample script for fetching a page's current contents in Wiki markup
#
require 'lib/media_wiki'

config = MediaWiki::Config.new ARGV 
config.abort("Name of article is mandatory.") unless config.article

mw = MediaWiki::Gateway.new(config.url, { :loglevel => Logger::DEBUG } )
mw.login(config.user, config.pw)
content = ARGF.read.to_s
puts mw.create(config.article, content, {:overwrite => true, :summary => config.summary})

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
mediawiki-gateway-0.4.3 script/create_page.rb
mediawiki-gateway-0.4.2 script/create_page.rb
mediawiki-gateway-0.4.1 script/create_page.rb
mediawiki-gateway-0.3.8 script/create_page.rb
mediawiki-gateway-0.3.7 script/create_page.rb
mediawiki-gateway-0.3.6 script/create_page.rb
mediawiki-gateway-0.3.5 script/create_page.rb
mediawiki-gateway-0.3.4 script/create_page.rb
mediawiki-gateway-0.3.3 script/create_page.rb
mediawiki-gateway-0.3.2 script/create_page.rb
mediawiki-gateway-0.3.1 script/create_page.rb