ontodev/gizmos

Create `gizmos.export` module

Closed this issue · 2 comments

The module is similar to ROBOT export.

It should accept args to be able to use for ONTIE API.

It accepts a CURIE or set of CURIEs and optionally a select arg that provides a list of headers to select. The default format is HTML, but we will also support TSV, JSON-LD, and TTL outputs.

Examples:

gizmos.export FOO:123 --database foo.db --format JSON-LD > out.json
gizmos.export FOO:123 BAR:456 --database foo.db > out.html
gizmos.export FOO:123 --database foo.db --format TSV --no-headers > out.tsv

--no-headers does not include TSV headers

These examples should specify the SQLite database that the data comes from.

The immediate use case is to get these arguments from an HTTP query string, but it would be also great to use this from the command line. Query strings and command-line options are very similar, but there might be some gotchas.

Whoops, added a --database arg.