The Python scripts import the EAGLE data into the EAGLE Wikibase wiki. Import scripts have been developed for the following datasets:
- IRT
- Hispania Epigrafica
- Ubi Erat Lupa
- Petrae
- Attic Inscriptions Online
- InsAph
- ELTE
- Universitatea Babeş-Bolyai
- Arachne - Deutsches Archäologisches Institut
- Last Statue of Antiquities
- Roman Inscriptions of Britain
More information on EAGLE here: http://eagle-network.eu/
Using pywikipediabot rewrite branch.
The script library needs and uses extensively the Python regex module, the csv module, BeautifulSoup 4, and the XML etree module.
The raw data used by the scripts is contained in the file EAGLE-data.zip
.
This brief how-to covers the installation of the pywikibot "core" library as well the setup of this library for editing EAGLE Wiki. Its aim is to give you a working environment for further development.
We'll assume that your shell is Bash and you're installing the scripts in the directory ~/eagle
. Change the paths accordingly.
We're also generating the user-config.py files from scratch; if you are an advanced user you'll just need to add the relevant line for EAGLE Wiki (family="eagle"; lang="en").
$ mkdir eagle $ cd eagle $ git clone --recursive https://gerrit.wikimedia.org/r/pywikibot/core.git $ git clone https://github.com/EAGLE-BPN/eagle-wiki.git $ cp eagle-wiki/eagle_family.py core/pywikibot/families/eagle_family.py $ cd core $ python generate_user_files.py No user-config.py found in directory '/Users/alt/eagle/core'. WARNING: Skipping loading of user-config.py. WARNING: family and mylang are not set. Defaulting to family='test' and mylang='test'. Your default user directory is "/Users/alt/eagle/core" How to proceed? ([K]eep, [c]hange) K Do you want to copy user files from an existing Pywikibot installation? ([y]es, [n]o) n Create user-config.py file? Required for running bots. ([y]es, [N]o) y [...] 3: commons 4: eagle 5: i18n [...] Select family of sites we are working on, just enter the number or name (default: wikipedia): eagle The only known language: en The language code of the site we're working on (default: 'en'): Username on en:eagle: Pietrodn Do you want to add any other projects? ([y]es, [N]o) N Which variant of user_config.py? ([s]mall, [e]xtended (with further information)) s '/Users/alt/eagle/core/user-config.py' written. Create user-fixes.py file? Optional and for advanced users. ([y]es, [N]o) N $ python pwb.py login Password for user Pietrodn on eagle:en (no characters will be shown): Logging in to eagle:en as Pietrodn Logged in on eagle:en as Pietrodn. $ echo "export PYWIKIBOT2_DIR=~/eagle/core/" >> ~/.profile $ echo "export PYTHONPATH=$PYTHONPATH:~/eagle/core/" >> ~/.profile $ source ~/.profile $ cd ../eagle-wiki $ unzip EAGLE-data.zip
Now we can run an example script:
$ python get_property_list.py -property:50 -show:property