About | Technologies | Requirements | Starting | Import | Author
This bot imports all data of MiMoText. The data come in TSV files and need a defined header to work.
The following tools were used in this project:
Before starting, you need to have Git installed.
Install or clone Pywikibot. Move to scripts/userscripts in your Pywikibot folder.
# Clone this project
$ git clone https://github.com/MiMoText/Wikibase-Bot
# Access
$ cd Wikibase-Bot
Add a Bot to WikiBase
- Special Pages > Bot passwords
- Enter Bot name > create
- Grant all privileges > create
- copy password
- go to WikiBot/user-password.py
- add the line
('<user>', BotPassword('<bot-name>', '<password>') > save
#Import needs <user>-password authentification
$ python3 ../../../pwb.py login
#Properties
$ python3 ../../../pwb.py importTSV.py <family> data/ImportProperties.tsv <sparql-endpoint>
#Items
$ python3 ../../../pwb.py importTSV.py <family> data/ImportItems.tsv <sparql-endpoint>
#Authors
$ python3 ../../../pwb.py importTSV.py <family> data/Authors.tsv <sparql-endpoint>
#BGRF
$ python3 ../../../pwb.py importTSV.py <family> data/BGRF_100.tsv <sparql-endpoint>
$ python3 ../../../pwb.py importTSV.py <family> data/BGRF_2000-100.tsv <sparql-endpoint>
#theme concepts and spatial concepts
$ python3 ../../../pwb.py importTSV.py <family> data/Themenvokabular.tsv <sparql-endpoint>
$ python3 ../../../pwb.py importTSV.py <family> data/Raumvokabular.tsv <sparql-endpoint>
#topic label
$ python3 ../../../pwb.py importTSV.py <family> data/topic_label.tsv <sparql-endpoint>
# statements
$ python3 ../../../pwb.py importTSV.py <family> data/bgrf100_about_statements.tsv <sparql-endpoint>
$ python3 ../../../pwb.py importTSV.py <family> data/bgrf2000-100_about_statements.tsv <sparql-endpoint>
$ python3 ../../../pwb.py importTSV.py <family> data/mmt_2020-11-19_11-38_statements.tsv <sparql-endpoint>
#narrative form
$ python3 ../../../pwb.py importTSV.py <family> data/new-items_narrative_form.tsv <sparql-endpoint>
$ python3 ../../../pwb.py importTSV.py <family> data/BGRF100_narrative_form_edit.tsv <sparql-endpoint>
$ python3 ../../../pwb.py importTSV.py <family> data/BGRF2000-100_narrative_form_edit.tsv <sparql-endpoint>
#narrative location
$ python3 ../../../pwb.py importTSV.py <family> data/BGRF_100_narrative-location_reconciled.tsv <sparql-endpoint>
$ python3 ../../../pwb.py importTSV.py <family> data/BGRF_2000-100_narrative-location.tsv <sparql-endpoint>
$ python3 ../../../pwb.py importTSV.py <family> data/NER_narrative-loc.tsv <sparql-endpoint>
Made with ❤️ by Moritz Steffes