Skip to content

iSCInc/HWbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

HWbot

The Hello World! Bot for MediaWiki wikis.

Framework

A Ruby framework for MediaWiki API manipulation: MediaWiki::Gateway.

Installation

  • Get framework:
$ gem install mediawiki-gateway
  • Clone project:
$ git clone https://github.com/SuriyaaKudoIsc/HWbot
  • Add it to your application's Gemfile:
gem 'mediawiki-gateway'
  • Then execute the command:
$ bundle

Usage

Simple page creation script:

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