Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Pull request Compare This branch is 147 commits behind jpatokal:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
README
create_page.rb
delete_batch.rb
download_batch.rb
export_xml.rb
get_page.rb
import_xml.rb
run_fake_media_wiki.rb
search_content.rb
upload_commons.rb
upload_file.rb

README

Sample scripts using MediaWiki::Gateway.  These expect to be run from the MediaWiki::Gateway root directory with ./config/hosts.yml accessible and configured with real usernames, passwords etc.  Remove Logger::DEBUG from scripts for less verbose output.

All the script use the local instance of MediaWiki::Gateway in ./lib.  To use an installed gem, use this require line instead:

  require 'media_wiki'

Examples:

Check syntax for create page script

  ruby script/create_page.rb

Pipe the content of "content.txt" into the page 'Sandbox:MediaWikiGatewayTest' on the English Wikipedia

  ruby script/create_page.rb -h en-wp -a Sandbox:MediaWikiGatewayTest <content.txt
    *or*
  ruby script/create_page.rb --host en-wp --article Sandbox:MediaWikiGatewayTest <content.txt

Something went wrong with that request. Please try again.