You are browsing a read-only backup copy of Wikitech. The primary site can be found at

Help:Tool Labs/My first Pywikibot tool

From Wikitech-static
< Help:Tool Labs
Revision as of 09:09, 1 May 2017 by imported>Zhuyifei1999 (→‎Access your Pywikibot tool: update)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Pywikibot is a Python library which automates work on MediaWiki sites. Use this guide to create your own tool based on Pywikibot and host it on Tool Labs.

Tool Labs account required: Before creating your tool, you need to create an account to access Tool Labs. Set up your user name and shell name and request access to the Tools Project.

Create your Pywikibot Tool account

Access your Pywikibot tool

After you create your Pywikibot's tool account, you can log into your tool project with SSH.

$ ssh <shell name>

Switch to your tool account:

maintainer@tools-bastion:~$ become <toolname>

Now, you can install Pywikibot.

Install Pywikibot

Using your tool account run the following:

  1. Use git to download Pywikibot:
    git clone --recursive
  2. Set up your bot for selected wikis by running:

Choose a license

Publish your source code

Create a documentation page