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: Difference between revisions
Jump to navigation
Jump to search
imported>Zhuyifei1999 (→Access your Pywikibot tool: update) |
imported>BryanDavis (Update account creation and tool labs membership instructions phab:T53642) |
||
Line 3: | Line 3: | ||
'''Tool Labs account required:''' | '''Tool Labs account required:''' | ||
Before creating your tool, you need to [[Help:Tool_Labs/Getting_started#Creating_your_account|create an account to access Tool Labs]]. Set up your user name and shell name and [ | Before creating your tool, you need to [[Help:Tool_Labs/Getting_started#Creating_your_account|create an account to access Tool Labs]]. Set up your user name and shell name and submit a [https://toolsadmin.wikimedia.org/tools/membership/apply Tool Labs project membership request]. | ||
==Create your Pywikibot Tool account== | ==Create your Pywikibot Tool account== |
Revision as of 00:17, 9 May 2017
![]() | 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