Crates.io | okh-tool |
lib.rs | okh-tool |
version | 0.5.2 |
source | src |
created_at | 2023-12-04 19:54:39.088408 |
updated_at | 2024-06-01 10:25:12.342922 |
description | A CLI tool to deal with Open Know-How (OKH) data files. Its main functionalities are: validation of and conversion between the different formats. |
homepage | https://github.com/OPEN-NEXT/LOSH-OKH-tool |
repository | https://github.com/OPEN-NEXT/LOSH-OKH-tool |
max_upload_size | |
id | 1057994 |
size | 624,356 |
A CLI tool to deal with OKH data files. Its main functionalities are:
different formats of OKH
This repo contains two pieces of software:
okh-tool
fetch-n-conv-v1
and it uses the OKH JSON-Schemas repo as submodule.
The okh-tool
can:
The fetch-n-conv-v1
script will:
The okh-tool
is written in rust, and can be compiled like this:
cargo build --release
This will produce the stand-alone binary tool in target/release/okh-tool
.
To run it, you have these options for conversion:
$ okh-tool conv --help
okh-tool-conv 0.1.0
Converts one format into an other (currently only OKH-v1 to OKH-LOSH)
USAGE:
okh-tool conv [OPTIONS] <INPUT> [OUTPUT]
ARGS:
<INPUT> The input file or dir path
<OUTPUT> The output file or dir path
OPTIONS:
-c, --continue If the input path is a directory, continue processing further files, even
after an error
-h, --help Print help information
-o, --overwrite If the outout file alreayd exists, overwrite it, instead of skipping the
conversion
-r, --recursive If the input path is a directory, search for input files recursively
-V, --version Print version information
and these for validation:
$ okh-tool val --help
okh-tool-val 0.1.0
Validates manifest files for validity using JSON Schema (currently supports OKH-v1 and OKH-LOSH)
USAGE:
okh-tool val [OPTIONS] <INPUT>
ARGS:
<INPUT> The input file or dir path
OPTIONS:
-c, --continue If the input path is a directory, continue processing further
files, even after an error
-h, --help Print help information
-o, --okh-version <okh-version> If the input path is a directory, search for input files
recursively [possible values: v1, losh]
-r, --recursive If the input path is a directory, search for input files
recursively
-V, --version Print version information
Once you have the above described okh-tool
ready
(it is required by this script),
you may just start the whole process like follows;
but be wary, this may take around 3h
(99+% of which is spent downloading).
The already downloaded files will not be re-downloaded
when you abort the process and start a-new.
./fetch-n-conv-v1
This project was funded by:
the European Union's Horizon 2020 research and innovation program, under grant agreement no. 869984, in the context of the OPEN!NEXT Project, from November 2021 (project start) until July 2022.
the European Regional Development Fund (ERDF) in the context of the INTERFACER Project, from August 2022 until March 2023.