You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org
Help:Tool Labs/My first Pywikibot tool
< Help:Tool Labs
Jump to navigation
Jump to search
Revision as of 00:17, 9 May 2017 by imported>BryanDavis (Update account creation and tool labs membership instructions phab:T53642)
![]() | This page is currently a draft. More information and discussion about changes to this draft on the talk page. |
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 submit a Tool Labs project membership request.
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>@login.tools.wmflabs.org
Switch to your tool account:
maintainer@tools-bastion:~$ become <toolname>
tools.<toolname>@tools-bastion:~$
Now, you can install Pywikibot.
Install Pywikibot
Using your tool account run the following:
- Use git to download Pywikibot:
git clone --recursive https://gerrit.wikimedia.org/r/pywikibot/core.git
-
Set up your bot for selected wikis by running:
python generate_user_files.py