User:Legoktm/Pywikipedia

From Wikipedia, the free encyclopedia

Userpage
Talk
Subpages
Barstars
Contributions
Userpage
(Commons)
Talk
(Archives)
Subpages

Barnstars

Sandboxes

Contributions

edit
What to look at today:
A 'crat bot?
Notice This manual will teach you how to set up the pywikipedia framework on Mac OS X, but not how to actually program in pywikipedia. This guide is based on Botwiki:Manual:Speed guide for pywikipediabot.
Warning You MUST understand the Bot Policy before testing this bot out, or you risk being BLOCKED.

Contents

[edit] Installing Python

Download Python to your desktop from here (direct link). Unzip the file and run the installer. Python should now be successfully installed.

[edit] Installing Pywikipedia

  • Download the file pywikipedia-nightly.tar.bz2 from here. (direct link)
  • Unzip the file
  • Move the pywikipedia folder to your "home" folder.

[edit] Setting Your Configuration

  • Open the application "TextEdit"
  • Copy and paste the following:
mylang = 'en'
family = 'wikipedia'
usernames['wikipedia']['en'] = 'USERNAME'
console_encoding = 'utf-8'
mylang: choose language of the wiki you want to edit (for commons use "commons" without the quotes)
family: what WMF wiki you want to edit. (You can edit some other non-WMF wikis, list at Botwiki)
usernames: first bracket is family, second bracket is mylang and USERNAME is the user who will be making the edits.
  • Save the file as user-config.py in your pywikipedia folder. (Text edit probably will make you add .txt at the end, but you can manually remove it)

[edit] Running the Program

  • Open the application Terminal, which is can be found in the Utilities folder in Applications.
  • Type in cd pywikipedia
  • Then python login.py You will be asked for your password. Your password will not show up for security reasons, but it will be entered. (You only have to do this step the first time.)
  • Type in python and then the name of the script you wish to run. Example: python welcome.py

[edit] Easy Scripts

See botwiki:Template:Scripts for more

[edit] Need Help

[edit] Further Reading