Open the command line interface (cli) on your system (Linux/ Windows cmd German: Eingabeaufforderung) and copy the following code-lines to you command line:
-
Make sure Rust is installed on your system.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shand update it regularly:
rustup update -
Install this ofdb-cli for Kartevonmorgen:
cargo install --locked --git https://github.com/kartevonmorgen/ofdb-cli
-
It might take a while but then it is usually installed in
~/.cargo/bin/ofdbon Linux orC:\Users\USERNAME\.cargo\bin\ofdb.exeon Windows.
cargo install --locked --force --git https://github.com/kartevonmorgen/ofdb-cliMake sure the CSV file has all required fields (example: tests/import-example.csv). Don't give an ID, created_by, date or Version-Number. But dont forget the Licens CC0-1.0.
Navigate to the folder with your import.csv, i.e.: cd C:\Users\XYZ\Project XYZ\B. Import
ofdb --api-url https://dev.ofdb.io/v0/ import --opencage-api-key 2049603a30ec4cb8a96c2c7fe662dc96 --report-file import-report.json "import.csv"NOTE:
- replace the OpenCage API key with a valid one
- Checkout the current API versions
- Use the
--help-Command in the cli to get the possible operation for each function. I.e.:ofdb import --help - If you need additional debug-info use `ofdb RUST_LOG=debug cargo run -- --api-url https://api.ofdb.io/v0 update --patch --report-file update-patch-02-10 update-patch.csv
- It first tries to read all data in the csv and finds geocoordinates for every entry via the opencage-api.
- Then the duplicate-Checking is automatically starting, which compares existing places 20 m around your new entry.
- 2.1 If there are no duplicates, then it gets automatically imported.
- 2.2 If there are possible duplicates, the entries will not be imported, but in the report.json are given all IDs of duplicates
- Update real identified duplicates manually with your new data.
- Last step is the final import of all wrongly indentified duplicates with a forced import ignoring possible duplicates, with the following command:
If you have recieved duplicate warnings in your first import, but you are sure, that your entries are really new ones, use the additional command:
--ignore-duplicatesofdb --api-url https://dev.ofdb.io/v0/ update updates.jsonThe file to update must be an array of entries:
[
{ "id": "...", "title": ".." }
]ofdb --api-url https://dev.ofdb.io/v0/ update --patch --report-file update-report.json update.csv- you have to increase the version number manually in your csv
- leave the licencse form empty, you can't patch the license
Make sure the CSV file has all required fields (an example can be found in
tests/update-patch.csv).
Make sure the CSV file has all required fields (an example can be found in tests/update-patch-example.csv.
ofdb --api-url https://dev.ofdb.io/v0/ review --email [email protected] --password PASSWORD123 "review.csv"You need to have moderation rights. Register here: https://openfairdb.org/register and request to become Scout/Pilot via [email protected]