Crates.io | triples |
lib.rs | triples |
version | 0.2.4 |
source | src |
created_at | 2023-09-16 17:01:00.414659 |
updated_at | 2023-11-11 13:47:52.455241 |
description | A lib and cli for storing data triples |
homepage | |
repository | https://github.com/navicore/triples |
max_upload_size | |
id | 974464 |
size | 263,938 |
Experimental Rust lib to store any data in triple format.
cargo install triples
or
see crate
For API usage, see the unit tests in db_api for now.
For cli usage:
triples -h
A lib and cli for storing data triples
Usage: triples [OPTIONS] <COMMAND>
Commands:
import-turtle
export-turtle
import-csv
export-csv
help Print this message or the help of the given subcommand(s)
Options:
-d, --db-location <DB_LOCATION> [default: /tmp/triples.db]
-h, --help Print help
-V, --version Print version
import csv and prepend NS prefixes
cat ../vssgen/vss_sm.csv | triples -d /tmp/vss.db import-csv --subject-default-ns https://myvss.com/id --predicate-default-ns https://myvss.com/data --skip-headers
export ttl
triples --db-location /tmp/vss.db export-turtle
@prefix ns1: <https://myvss.com/id/> .
@prefix ns2: <https://myvss.com/data/> .
ns1:d654c9bc-37d7-425e-945b-41a4440da236
ns2:has_chassis "1ad84bfb-2017-4c42-b28f-de938755cb00" ;
ns2:timestamp "2023-09-17 21:07:36" ;
ns2:type "vehicle" ;
ns2:has_drivetrain "8db9fa98-5017-43d3-accd-bebe822a4066" ;
ns2:vehicle_id "0" ; .
ns1:1ad84bfb-2017-4c42-b28f-de938755cb00
ns2:brake_status "False" ;
ns2:type "chassis" ;
ns2:speed "79" ; .
ns1:8db9fa98-5017-43d3-accd-bebe822a4066
ns2:engine_temperature "106" ;
ns2:fuel_level "56" ;
ns2:type "drivetrain" ;
ns2:battery_level "3" ; .
*.tll
format*.csv
format*.csv
format*.json
format*.jsonl
formatPRs welcome