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
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{draft}}
#REDIRECT [[Help:Toolforge/My first Pywikibot tool]]
[[mw:Manual:Pywikibot|Pywikibot]] is a [[w:Python_(programming_language)|Python]] library which automates work on MediaWiki sites. Use this guide to create your own tool based on Pywikibot and host it on [[Help:Tool_Labs|Tool Labs]].
 
'''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]].
 
==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.
 
<source >
$ ssh <shell name>@login.tools.wmflabs.org
</source>
 
Switch to your tool account:
 
<source>
maintainer@tools-bastion:~$ become <toolname>
tools.<toolname>@tools-bastion:~$
</source>
 
Now, you can install Pywikibot.
 
==Install Pywikibot==
Using your tool account run the following:
 
<ol>
<li>Use git to download Pywikibot:
<source>
git clone --recursive https://gerrit.wikimedia.org/r/pywikibot/core.git
</source>
</li>
<li>
Set up your bot for selected wikis by running:
<source>
python generate_user_files.py
</source>
</li>
</ol>
 
==Choose a license==
 
==Publish your source code==
 
==Create a documentation page==

Latest revision as of 18:47, 14 July 2017