This repository has reached the end of its life-cycle. If you look for meteor, go to: https://github.com/opted-eu/meteor-api
This is the code repository for Meteor (the WP3 Inventory), which will contain an interlinked knowledge graph of news sources, media organizations, and data archives in Europe (for details see the OPTED main page). Currently, this is a prototype / work in progress.
Meteor is a web based application that allows users to
- browse & query the Meteor database
- Add new entries to the database
- edit and update existing entries
- Clone the repository
- Install the requirements via pip (
python3 -m pip install -r requirements.txt
) - Install DGraph on your local machine (see official documentation)
- Launch your local DGraph instances (alpha and zero)
- Launch the inventory via
python3 run.py
- alternatively you can specify a configuration via
python3 run.py --config config.json
- alternatively you can specify a configuration via
- Set the data schema to your DGraph instance via
python3 tools/setschema.py
- Add sample data to your DGraph instance using
python3 tools/sample_data.py
- Open your browser at your localhost with port 5000 (http://127.0.0.1:5000)
├── data # contains sample data in various formats and the dgraph schem
├── flaskinventory # root folder for flask
├── README.md # this file
├── requirements.txt # python requirements
├── run.py # Flask launcher
└── tools # collection of helper scripts and files for server deployment
Please contact Paul Balluff for contribution. If you found a problem, just raise an issue here in this repository.
Level | Name | Permissions |
---|---|---|
0 | Anonymous | View entries |
1 | Contributor | Add entries |
2 | Reviewer | + Review & Edit Entries, Invite Users |
10 | Admin | + Change User Permissions |
- Bootstrap 5
- Font Awesome
- Tom-Select
- jquery typeahead
- bibtex-js
Currently backups are uploaded to ucloud (for data safety and convenience). If the amount of database dumps gets too large, a different solution would be preferred.
Backups are run by a user with root privileges, because database dumps are created by the dgraph
user and thus, cannot be manipulated directly by other users. Of course it would be possible to run some chown
magic though.
Make sure that the requests
module is installed for the root user.
create a settings file (backup.json
) inside the tools folder:
{
"ucloud_url": "https://ucloud.univie.ac.at/public.php/webdav/",
"ucloud_token": "secret",
"backup_path": "/mnt/public/backup/"
}
Make sure the directory backup_path
exists and that the dgraph
user has rights to write to it.
Simply execute the script tools/backup.py
.
Add it as cronjob with crontab -e
0 1 * * * /usr/bin/python3 /home/user/wp3inventory/tools/backup.py
- Get backup files and run the following command:
dgraph live --files g01.rdf.gz --schema g01.schema --zero localhost:5080