SERDI(1) | General Commands Manual | SERDI(1) |
serdi
—
serdi |
[-abefhlqv ] [-c
prefix] [-i
syntax] [-o
syntax] [-p
prefix] [-r
root] [-s
string] input
[base_uri] |
serdi
is a fast command-line utility for streaming and
processing RDF data. It reads an RDF document and writes the data to stdout,
possibly transformed and/or in a different syntax. By default, the input
syntax is guessed from the file extension, and output is written in NTriples
or NQuads.
serdi
can be used to check for syntax
errors, convert from one syntax to another, pretty-print documents, or
transform URIs and blank node IDs.
The options are as follows:
-a
-b
-c
prefix-p
. For
example, with prefix “doc01”, the
blank node _:doc01b42
will be emitted as
_:b42
.-e
-f
-h
-i
syntax-l
-o
syntax-p
prefix-c
. For example,
with prefix “doc01”, the blank node
_:b42
will be emitted as
_:doc01b42
.-q
-r
rootFor example, if /home/you/file.ttl is
written to the file /home/me/output.ttl using
the destination's base URI, then it could be written as
<../you/file.ttl>
. Setting
-r
file:///home/me/
would prevent references from “escaping” like this, so the
above would instead be written as
<file:///home/you/file.ttl>
, since it
can't be expressed relative to the root URI.
This is useful for keeping relative references within some directory.
-s
string-v
serdi
exits with a status of 0, or non-zero if an error
occurred.
serdi
-o
turtle file.ttl >
out.ttlserdi
file.ttl >
/dev/nullserdi
is a part of serd, by David
Robillard
d@drobilla.net.
April 30, 2023 | Serd 0.32.2 |