1SERDI(1)                  BSD General Commands Manual                 SERDI(1)
2

NAME

4     serdi — read and write RDF syntax
5

SYNOPSIS

7     serdi [-abefhlqv] [-c prefix] [-i syntax] [-o syntax] [-p prefix]
8           [-r root] [-s string] input [base_uri]
9

DESCRIPTION

11     serdi is a fast command-line utility for streaming and processing RDF
12     data.  It reads an RDF document and writes the data to stdout, possibly
13     transformed and/or in a different syntax.  By default, the input syntax
14     is guessed from the file extension, and output is written in NTriples or
15     NQuads.
16
17     serdi can be used to check for syntax errors, convert from one syntax to
18     another, pretty-print documents, or transform URIs and blank node IDs.
19
20     The options are as follows:
21
22     -a   Write ASCII output.  If this is enabled, all non-ASCII characters
23          will be escaped, even if the output syntax allows them to be written
24          in UTF-8.
25
26     -b   Bulk output writing.  If this is enabled, output will be written a
27          page at a time, rather than a byte at a time.
28
29     -c prefix
30          Chop prefix from matching blank node IDs.  This is the inverse of
31          -p.
32
33     -e   Eat input one character at a time, rather than a page at a time
34          which is the default.  This is useful when reading from a pipe since
35          output will be generated immediately as input arrives, rather than
36          waiting until an entire page of input has arrived.  With this option
37          serdi uses one page less memory, but will likely be significantly
38          slower.
39
40     -f   Keep full URIs in input (don't qualify with namespace prefixes or
41          make URIs relative).
42
43     -h   Print the command line options.
44
45     -i syntax
46          Read input as syntax.  Case is ignored, valid values are: “NQuads”,
47          “NTriples”, “TriG”, “Turtle”.
48
49     -l   Lax (non-strict) parsing.  If this is enabled, recoverable syntax
50          errors will print a warning, but parsing will proceed starting at
51          the next statement if possible.  Note that data may be lost when us‐
52          ing this option.
53
54     -o syntax
55          Write output as syntax.  Case is ignored, valid values are:
56          “NQuads”, “NTriples”, “TriG”, “Turtle”.
57
58     -p prefix
59          Add prefix to blank node IDs.  This can be used to avoid clashes be‐
60          tween blank node IDs in input documents.
61
62     -q   Suppress all output except data.
63
64     -r root
65          Keep relative URIs within a root URI.  This will avoid creating any
66          relative URI references with leading path segments like “../” that
67          enter a parent of root.
68
69     -s string
70          Parse string input instead of a file (terminates options).
71
72     -v   Display version information and exit.
73

EXIT STATUS

75     serdi exits with a status of 0, or non-zero if an error occurred.
76

EXAMPLES

78     To pretty-print a document:
79
80           $ serdi -o turtle file.ttl > out.ttl
81
82     To print any errors:
83
84           $ serdi file.ttl > /dev/null
85

SEE ALSO

87     http://drobilla.net/software/serd/
88     http://gitlab.com/drobilla/serd/
89

STANDARDS

91     W3C, RDF 1.1 NQuads, February 2014.  https://www.w3.org/TR/n-quads/
92
93     W3C, RDF 1.1 NTriples, February 2014.  https://www.w3.org/TR/n-triples/
94
95     W3C, RDF 1.1 TriG, February 2014.  https://www.w3.org/TR/trig/
96
97     W3C, RDF 1.1 Turtle, February 2014.  https://www.w3.org/TR/turtle/
98

AUTHORS

100     serdi is a part of serd, by David Robillard d@drobilla.net.
101
102Serd 0.30.16                     Jul 15, 2022                     Serd 0.30.16
Impressum