FANDOM


Install-button

This page describes the installation process for Linux devices, step by step. It is written by a moderately experienced Linux user.

Step OneEdit

Click here to download the Compat version of PWB (this link will begin the download.)

Linux-button

Once downloaded extract the contents of the zip file to someplace on your computer, at the time of this writing I have extracted it to my Desktop into a folder called "compat" which is inside of a folder called "PyBot".

Step TwoEdit

Generating family files Edit

Once you have the file extracted to your desired folder open your favourite terminal. Once you have your terminal open, and you're inside the folder containing your bot, input the following command,

After you have entered that command you should be prompted to enter the URL of the wiki on which you would like to use your bot on, if not re-check that you have entered the command properly.

Input the URL for the wiki:

http://www.example.wikia.com

Now enter a short name for the wiki:

example_wikia


This will begin the creation of the wiki's family file.

Generating user files Edit

Once you have the family files for the wiki you can start creating your user-config file. This is a fairly straight forward process. If you have closed your terminal open it back up and navigate to the folder containing your bot. Once you are back in it input the following command:

It will ask you whether you would like to create a user file, a fixes file, or both. Type in "3" and press enter. Next it should give you a list of the site languages. There should only be one "wikia" press enter. Next it will ask for a username, be sure to input your bot's username, not your own!

It will now ask you which variant of the user-config file you would like to make, [S]mall or [E]xtended. Type in "S" and press enter. If everything worked out properly you should be given a message saying the files had been created, if not check yourself.

Step three Edit

Now you must allow your bot to edit on the chosen wiki. To do this, open up your user-config file using your favourite text editor.

Find where it says "family = 'wikia'" and change "wikia" to the shortname of the wiki that you entered when you generated the family file:

"family = 'example_wikia'"

Next, find the line that looks like this: "usernames['wikia']['en'] = u'ExampleBot'". Correct if necessary to your bot's name.

Find where it says "usernames['wikia']['en']" and create a new line and change it to:

"usernames['example_wikia']['en']"

Save the file.

Congratulations! You have successfully installed the Python Wikipedia Bot on your computer! Now to begin editing using your newly created bot, type in python login.py and type in your bot's password. (The password will be hidden by default, so don't freak out when you don't see it.)

$ python login.py

Known IssuesEdit

Occasionally, when setting your bot up to operate on a Linux machine you will get an error like the one to the side.
ErrorMessage01
This error is very simple to fix. Simply open the version.py file located inside of the pywikibot folder. The pywikibot folder is located inside your Pywikipedia folder. Once you have this file opened you can search for "WindowsError", there should only be one occurence. Simply replace this with "OSError" and save the file. This should allow you to run your scripts like normal.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.