Anarchopedia:Bots

From Anarchopedia
Revision as of 00:00, 10 November 2014 by 85.19.211.48 (Talk) (APIs for bots)

Jump to: navigation, search

See in French : Bot

Bots can automate tasks and perform them much faster than humans. If you have a simple task which you need to perform lots of times (an example might be to add a template to all pages in a category with 1000 pages) then this is a task better suited to a bot than a human. Very nice site!

Installing Pywikipediabot

In short, make a subdirectory inside of your working directory and go there:

$ mkdir mybot
$ cd mybot

Invoke Subversion checkout to download pywikipediabot:

$ svn checkout http://svn.wikimedia.org/svnroot/pywikipedia/trunk/pywikipedia/ pywikipedia

Pywikipediabot is a very active project. Because of that you should periodically (maybe daily, maybe weekly) update your copy:

$ cd pywikipedia/
$ svn update

Logging in

Your bot should be logged in to the particular project. Go into the directory "pywikipedia":

$ cd pywikipedia/

Make file "user-config.py" by using your favorite editor. It should contain something like:

mylang = 'en'
family = 'anarchopedia'
usernames['anarchopedia']['en'] = 'My Bot Name'
usernames['anarchopedia']['pl'] = 'My Bot Name'
usernames['anarchopedia']['sr'] = 'My Bot Name II' # you may use different names

By invoking "login.py" program...

$ python login.py

... you will get a prompt for inserting your password...

Checked for running processes. 1 processes currently running, including the current process.
Password for user My Bot Name on wikinews:en: 

... and, if everything is good, program will give to you a message like:

Logging in to anarchopedia:en as My Bot Name
Should be logged in now

However, if you have more then one account (like it was described) and you have one password for all bots (which is little bit less safe, but much more practical), you should use options "-all" and "-pass":

python login.py -all -pass
Checked for running processes. 1 processes currently running, including the current process.
Password for all accounts: 
Logging in to anarchopedia:sr as My Bot Name II
Should be logged in now
Logging in to anarchopedia:en as My Bot Name
Should be logged in now
Logging in to anarchopedia:pl as My Bot Name
Should be logged in now

Invoking Python

You may invoke scripts by typing "python" before them:

$ python mybot.py

Scripts

Here is a list of the existing bots with links to their descriptions:

  Main bot scripts   Other bot scripts  



Auxiliary programs