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
ez_setup.py flake8: Fix E305 errors and remove it from ignored codes 9 months ago
generate_family_file.py [cleanup] remove `__version__` string from pywikibot framework scripts 1 month ago
generate_user_files.py [cleanup] remove `__version__` string from pywikibot framework scripts 1 month ago
pwb.py [bugfix] pwb.py: bad 'user-config.py' was not found 3 weeks ago
requests-requirements.txt Update requirements 1 month ago
requirements.txt Update requirements 1 month ago
setup.py Declare development status as Production/Stable 1 month ago
tox.ini [IMPR] Exclude userscripts from flake8 checks 3 weeks ago
user-config.py.sample [doc] remove duplicate spaces inside doc strings 1 year ago
user-fixes.py.sample Import unicode_literals in user-fixes.py.sample 9 months ago

README.rst

.. image:: https://secure.travis-ci.org/wikimedia/pywikibot.png?branch=master
:alt: Build Status
:target: https://travis-ci.org/wikimedia/pywikibot
.. image:: https://codecov.io/gh/wikimedia/pywikibot/branch/master/graphs/badge.svg?branch=master
:alt: Code coverage
:target: http://codecov.io/github/wikimedia/pywikibot?branch=master
.. image:: https://codeclimate.com/github/wikimedia/pywikibot-core/badges/gpa.svg
:alt: Maintainability
:target: https://codeclimate.com/github/wikimedia/pywikibot-core
.. image:: https://img.shields.io/pypi/v/pywikibot.svg
:alt: Pywikibot release
:target: https://pypi.python.org/pypi/pywikibot

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.

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

Quick start
-----------

::

git clone https://gerrit.wikimedia.org/r/pywikibot/core.git
cd core
git submodule update --init
python pwb.py 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')
page.save('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

Contributing
------------

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

.. include:: CODE_OF_CONDUCT.rst