The Full Wiki

More info on Pywikipediabot/General basics/Logging in

Pywikipediabot/General basics/Logging in: Wikis

Advertisements

Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! This article doesn't yet, but we're working on it! See more info or our list of citable articles.

Study guide

Up to date as of January 14, 2010

From Wikiversity

Your bot should be logged in to the particular project.

If you don't have a bot account on some project, open it. On bot's user page state clearly that this is a bot account, that you are the owner of the bot and that bot will not do anything outside of getting pages and testing inside of its and your user space. Also, note that you will ask community for any other bot action. Such bot doesn't need a bot flag. However, be careful with contamination of Recent changes. This means that you shouldn't have more then, let's say, 10 edits per day on some bigger project, which means that you should use some bigger project for learning.

Go into the directory "pywikipedia":

$ cd pywikipedia/

Make file "user-config.py" by using your favorite editor (emacs, vim, joe, nano...). It should contain something like:

mylang = 'en'
family = 'wikinews'
usernames['wikinews']['en'] = 'My Bot Name'
usernames['wikinews']['pl'] = 'My Bot Name'
usernames['wikinews']['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 wikinews:en as My Bot Name
Should be logged in now

However, if you have more than 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":

millosh@Malatesta:~/wikinews/pywikipedia$ python login.py -all -pass
Checked for running processes. 1 processes currently running, including the current process.
Password for all accounts: 
Logging in to wikinews:sr as My Bot Name II
Should be logged in now
Logging in to wikinews:en as My Bot Name
Should be logged in now
Logging in to wikinews:pl as My Bot Name
Should be logged in now
millosh@Malatesta:~/wikinews/pywikipedia$ 
Advertisements

Advertisements






Got something to say? Make a comment.
Your name
Your email address
Message