Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

lotusnprod/lotus-wikidata-importer

Repository files navigation

Lotus_bot

This is a Bot for WikiData. It is used to import the data for the LOTUS and the WikiData Natural Products Chemistry project

It is written in Kotlin and uses:

Requires Java >=11

Build

This build use a jar version of wiki-java in libs, make sure you update that from time to time.

Run

Add an article by DOI

Replace <> and <> by your users and password. Notice the space in front of that command to not store them in your shell history.

 export WIKIDATA_USER=<<foo>>
 export WIKIDATA_PASSWORD=<<bar>>
./gradlew :publication_importer:run --args "10.1007/BF00598758"

Import lotus Data

Replace <> and <> by your users and password. Notice the space in front of that command to not store them in your shell history.

This will run a single entry from the file in test mode:

 export WIKIDATA_USER=<<foo>>
 export WIKIDATA_PASSWORD=<<bar>>
./gradlew :lotus_importer:run --args="--input data/manuallyValidated.tsv"

This will run the full file in test mode:

 export WIKIDATA_USER=<<foo>>
 export WIKIDATA_PASSWORD=<<bar>>
./gradlew :lotus_importer:run --args="--input data/manuallyValidated.tsv -l -1"

This will run the first line of the file in real mode (you will likely need bot rights to do that:

 export WIKIDATA_USER=<<foo>>
 export WIKIDATA_PASSWORD=<<bar>>
./gradlew :lotus_importer:run --args="--input data/manuallyValidated.tsv -r"

If you need to produce a jar file (to use on a different machine for example)

./gradlew build

The distribution will be available in build/distributions (.zip and .tar.gz)

There is work to do to reduce the size of the distribution (use java modules, use only the parts of cdk and rdf4j we are really using).

Developers

If you need to upgrade wiki-java

You need to make sure you did a recursive clone of this repository with

git clone --recursive

You can then update the repo and update the jars:

git submodule update
cd external/wiki-java
mvn package  # You need to have maven installed obviously, and this will take some time (2 min on a Ryzen 3700X)
rm ../../libs/wiki-java-*.jar
cp target/wiki-java-*.jar ../../libs

Don't forget to update build.gradle.kts if the version changed.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published