Manual:Pywikipediabot/basic.py

From MediaWiki.org
Jump to: navigation, search
Wikimedia-logo-meta.png

This page was moved from MetaWiki.
It probably requires cleanup – please feel free to help out. In addition, some links on the page may be red; respective pages might be found at Meta. Remove this template once cleanup is complete.

Bug blank.svg
Subversion repository of Wikimedia has this file:
Bote Boas Vindas2.png
Pywikipediabot
scripts
Pywikipediabot Overview
Quick Start Guide
Installation
Installation (Mac)
Configuration
user-config.py
Non-Wikimedia wikis
Tutorial
Scripts
Development
Further help

v  d  e

basic.py is a script of the Pywikipedia bot framework. It is not a complete bot; rather, it is a template from which simple bots can be made. You can rename it to mybot.py, then edit it in whatever way you want.

[edit] Parameters

The following parameters are supported:

-dry
If given, doesn't do any real changes, but only shows what would have been changed.

All other parameters will be regarded as part of the title of a single page, and the bot will only work on that single page.

[edit] Example

python basic.py -dry User:MyUserName

This tries to add 'Text ' in front of the page User:MyUserName. Since the -debug option is given, the page wouldn't be changed.
Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox