Github mirror of "pywikibot/core" - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing
Python
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 3869 commits behind wikimedia:master.
xZise [IMPROV] script_test: Simplify test for stderr
If there is expected output for that script it should just check that. The
additional check if it's an autorun script are unnecessary. The same is true
for the reverse and if there is no expected output and it is not an autorun
script then it should do the checks related to that.

Change-Id: Ic40aee0b1975ad1f785f27bafd3e56bc09511ada
Latest commit 00eb20f Jul 17, 2015
Permalink
Failed to load latest commit information.
docs
pywikibot
scripts
tests
.appveyor.yml
.gitattributes
.gitignore
.gitmodules
.gitreview
.svnprops update .svnprops Jun 23, 2015
.travis.yml
CREDITS
ChangeLog
LICENSE
README-conversion.txt
README.rst
dev-requirements.txt
ez_setup.py
generate_family_file.py
generate_user_files.py
pwb.py
requirements.txt Remove dependency on pYsearch Jul 16, 2015
setup.py Remove dependency on pYsearch Jul 16, 2015
tox.ini
user-config.py.sample

README.rst

Pywikibot

The Pywikibot framework is a Python library that interfaces with the MediaWiki API version 1.14 or higher.

Also included are various general function scripts that can be adapted for different tasks.

Quick start

git clone https://gerrit.wikimedia.org/r/pywikibot/core.git
cd core
git submodule update --init
python pwb.py script_name

Our installation guide has more details for advanced usage.

Usage

If you wish to write your own script it's very easy to get started:

import pywikibot
site = pywikibot.Site('en', 'wikipedia')  # The site we want to run our bot on
page = pywikibot.Page(site, 'Wikipedia:Sandbox')
page.text = page.text.replace('foo', 'bar')
page.save('Replacing "foo" with "bar"')  # Saves the page

For more documentation on pywikibot see our docs.

Required external programms

It may require the following programs to function properly:

  • 7za: To extract 7z files

Contributing

Our code is maintained on Wikimedia's Gerrit installation, learn how to get started.

Build Status