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

From Wikitech-static
Jump to navigation Jump to search
imported>Zhuyifei1999
 
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 [[Special:FormEdit/Tools_Access_Request|request access to the Tools Project]].
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

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:

  1. Use git to download Pywikibot:
    git clone --recursive https://gerrit.wikimedia.org/r/pywikibot/core.git
  2. Set up your bot for selected wikis by running:
    python generate_user_files.py

Choose a license

Publish your source code

Create a documentation page