Sha256: bf25a8b8667a4781dd25e933d60ab9fab6cd91a1996978965c40eea7437cce84
Contents?: true
Size: 438 Bytes
Versions: 4
Compression:
Stored size: 438 Bytes
Contents
#!/usr/bin/env ruby # # Sample script for updating a MediaWiki article's content # 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
4 entries across 4 versions & 1 rubygems