Code to run the Python MediaWiki bot.

xqt 9f63d4fa2a [bugfix] fix super class call 2 weeks ago
docs tox.ini: Set rstcheck report level to warning and check all rst files 3 weeks ago
pywikibot Merge "Add support for Linter API in PageGenerators" 3 weeks ago
scripts Update git submodules 2 weeks ago
tests [bugfix] fix super class call 2 weeks ago
.appveyor.yml Update requirements 1 month ago
.codeclimate.yml [test] Exclude files and checks from code climate maintainability 1 month ago
.codecov.yml Add .coveragerc and codecov.yml 1 year ago
.coveragerc Add .coveragerc and codecov.yml 1 year ago
.gitignore git ignore cache folder (for windows users) too 4 months ago
.gitmodules Fix url for .gitmodules 4 months ago
.gitreview Add .gitreview file for git migration 4 years ago
.svnprops update .svnprops 2 years ago
.travis.yml .travis.yml: Remove Precise from build matrix 4 months ago
CODE_OF_CONDUCT.rst [doc] use reStructuredText instead of markdown 2 months ago
CONTENT.rst [bugfix, doc] enable restructuredText inclusions 2 months ago
CREDITS Credit myself by real name 1 year ago
ChangeLog Update ChangeLog for release 3.0.20170713 5 months ago
Dockerfile Install dev-requirements.txt into Docker image 2 years ago
HISTORY.rst DeprecationWarning: support for py2.6 and py3.3 will be dropped 1 month ago
LICENSE [DOC] Update pwb LICENSE 1 month ago
README-conversion.txt [DOC] core release is 3.0 6 months ago
README.rst [doc] Add codeclimate maintainabiltity shield and link to doc 1 month ago
dev-requirements.txt dev-requirements.txt: Add setuptools_scm to Python 2.6 requirements 1 month ago flake8: Fix E305 errors and remove it from ignored codes 9 months ago [cleanup] remove `__version__` string from pywikibot framework scripts 1 month ago [cleanup] remove `__version__` string from pywikibot framework scripts 1 month ago [bugfix] bad '' was not found 3 weeks ago
requests-requirements.txt Update requirements 1 month ago
requirements.txt Update requirements 1 month ago Declare development status as Production/Stable 1 month ago
tox.ini [IMPR] Exclude userscripts from flake8 checks 3 weeks ago [doc] remove duplicate spaces inside doc strings 1 year ago Import unicode_literals in 9 months ago


.. image::
:alt: Build Status
.. image::
:alt: Code coverage
.. image::
:alt: Maintainability
.. image::
:alt: Pywikibot release


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.

For further information about the library excluding scripts see
the full `code documentation `_.

Quick start


git clone
cd core
git submodule update --init
python script_name

Or to install using PyPI (excluding scripts)

pip install pywikibot --pre

Our `installation
guide `_
has more details for advanced usage.

Basic 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')'Replacing "foo" with "bar"') # Saves the page


For more documentation on pywikibot see our `docs `_.

.. include:: pywikibot/DIRECTORIES.rst

Required external programs

It may require the following programs to function properly:

* `7za`: To extract 7z files

.. include:: HISTORY.rst


Our code is maintained on Wikimedia's `Gerrit installation `_,
`learn `_ how to get

.. include:: CODE_OF_CONDUCT.rst