Skip to content

Commit

Permalink
README.md: Formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
blackwinter committed Oct 22, 2014
1 parent ddfbf84 commit f8f7bbe
Showing 1 changed file with 33 additions and 17 deletions.
50 changes: 33 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
# MediaWiki::Gateway

A Ruby framework for MediaWiki API manipulation. Features out of the box:
A Ruby framework for [MediaWiki API](http://www.mediawiki.org/wiki/API:Main_page) manipulation.

## Features

* Simple, elegant syntax for common operations
* Handles login, edit, move etc tokens for you
* Handles login, edit, move etc. tokens for you
* List, search operations work around API limits to fetch all results
* Support for maxlag detection and automated retries on 503
* Integrated logging
* Tested up to MediaWiki 1.22
* Should work with Ruby 1.9.3 and higher

Gem: http://rubygems.org/gems/mediawiki-gateway
## Links

RubyGem
: http://rubygems.org/gems/mediawiki-gateway

RDoc: http://rubydoc.info/gems/mediawiki-gateway
Documentation
: http://rubydoc.info/gems/mediawiki-gateway

Git: https://github.com/jpatokal/mediawiki-gateway
Source
: https://github.com/jpatokal/mediawiki-gateway

Travis CI: https://travis-ci.org/jpatokal/mediawiki-gateway
CI
: https://travis-ci.org/jpatokal/mediawiki-gateway

## Installation

Expand All @@ -38,14 +46,16 @@ and then execute the command:
$ bundle
```

## Example
## Usage

Simple page creation script:

require 'media_wiki'
mw = MediaWiki::Gateway.new('http://my-wiki.example/w/api.php')
mw.login('RubyBot', 'pa$$w0rd')
mw.create('PageTitle', 'Hello world!', summary: 'My first page')
```ruby
require 'media_wiki'
mw = MediaWiki::Gateway.new('http://my-wiki.example/w/api.php')
mw.login('RubyBot', 'pa$$w0rd')
mw.create('PageTitle', 'Hello world!', summary: 'My first page')
```

## Changing the default User-Agent

Expand All @@ -69,29 +79,35 @@ You only need to provide the part that identifies your own bot, an additional pa

To compile and test MediaWiki::Gateway locally, install its development dependencies:

gem install --development mediawiki-gateway
```shell
gem install --development mediawiki-gateway
```

Then this will list the available options:

rake -T
```shell
rake -T
```

To build and install the gem use:

rake gem:install
```shell
rake gem:install
```

### Testing against a live MediaWiki instance

You need to have [Docker](https://docker.com) and [mediawiki-testwiki](https://rubygems.org/gems/mediawiki-testwiki) installed.

## Status

This gem is no longer in active development. Pull requests that fix bugs or add new features are more than welcome, but asking for new features is unlikely to make them materialize out of thin air.
This gem is no longer in active development. Pull requests that fix bugs or add new features are more than welcome, but asking for new features is unlikely to make them materialize out of thin air.

## Credits

Loosely maintained by Jani Patokallio and [Jens Wille](https://github.com/blackwinter). If you'd be seriously interested in joining as an active maintainer, drop us a line!
Loosely maintained by Jani Patokallio and [Jens Wille](https://github.com/blackwinter). If you'd be seriously interested in joining as an active maintainer, drop us a line!

Thanks to:

* John Carney, Mike Williams, Daniel Heath and the rest of the Lonely Planet Atlas team.
* Github users for code contributions, see https://github.com/jpatokal/mediawiki-gateway/pulls
* GitHub users for code contributions, see https://github.com/jpatokal/mediawiki-gateway/pulls

0 comments on commit f8f7bbe

Please sign in to comment.