Getting Started : Running the wikiwho code on your local PC
All the instructions on this page are for running the code in Ubuntu.
- Make sure you have a running version of Python 3 on your computer.
- Install mediawiki utilities by running the following command in your terminal:
pip install mediawiki-utilities
as outlined in this site http://pythonhosted.org/mediawiki-utilities/
- Download the following two repositories and unzip them into a single folder.
- Download the xml dump of any wiki article of your choice into the same folder. e.g. https://en.wikipedia.org/wiki/Special:Export/Train
- Run the Wikiwhorelationships.py file using the following command to get the authorship for all tokens having a particular revision id (686845449 in the train.xml case)
python3 WikiwhoRelationships.py -i train.xml -o a -r 686845449
- You can use the following command to get the edit interactions of every revision to every other revision up to rev id 686845449:
python3 WikiwhoRelationships.py -i train.xml -o r -r 686845449
- The next step would be to get this code running in PythonAnywhere.
Deploying wikiwho code onto PythonAnywhere
- Create an account on PythonAnywhere. https://www.pythonanywhere.com
- In your local PC, first zip the running code.
- In PythonAnywhere, navigate to the ‘Files’ tab and upload this zipped directory.
- Open a new bash console and unzip this folder using the appropriate command depending on the zip type. e.g.
tar -xzvf file.tar.gz
- Now you can cd into the directory and follow steps 5 and 6 above.