SERDI(1)
๐ SERDI(1) ๐
okay bestie, buckle up โ this is the manual page for serdi, a General Commands Manual situation, and she is that girl.
โจ NAME โจ
serdi โ read and write RDF syntax, no big deal ๐
๐ SYNOPSIS ๐
serdi [-abefhlqv] [-c prefix] [-i syntax] [-o syntax] [-p prefix]
[-r root] [-s string] input [base_uri]
๐ฆ DESCRIPTION ๐ฆ
So. serdi is a fast command-line utility for streaming and processing RDF data. She reads an RDF document and writes the data to stdout, possibly transformed and/or in a different syntax. Iconic behavior honestly.
By default, the input syntax is guessed from the file extension, and output is written in NTriples or NQuads. She just knows. ๐ฎ
You can use serdi to:
- check for syntax errors ๐
- convert from one syntax to another ๐
- pretty-print documents โจ
- transform URIs and blank node IDs ๐ช
The options are as follows, and yes, we're going through every single one because we respect her:
๐ OPTIONS ๐
-aโ Write ASCII output. If this is enabled, all non-ASCII characters will be escaped, even if the output syntax would totally allow them to be written in UTF-8. She's playing it safe bestie.-bโ Bulk output writing. If this is enabled, output gets written a page at a time rather than a byte at a time. Efficiency queen.-cprefixโ Chopprefixfrom matching blank node IDs. This is typically used to revert the effects of-p(they're a duo, your honor ๐ซถ). For example, with prefixdoc01, the blank node_:doc01b42will be emitted as_:b42.-eโ Eat input one character at a time, rather than a page at a time, which is the default. This is useful when reading from a pipe, since output will be generated immediately as input arrives, rather than waiting until an entire page of input has arrived. With this optionserdiuses one page less memory, but will likely be significantly slower. Tradeoffs, bestie. ๐ญ-fโ Fast and loose URI mode: preserve full URIs (without qualifying or making relative), and pass prefixed names through as-is. She's not asking questions, she's just vibing.-hโ Print the command line options. Help a girl out. ๐-isyntaxโ Read input assyntax. Case is ignored. Valid values are:NQuads,NTriples,TriG,Turtle.-lโ Lax (non-strict) parsing. If this is enabled, recoverable syntax errors will print a warning, but parsing will proceed starting at the next statement if possible. Note that data may be lost when using this option. โ ๏ธ She's forgiving but she's not a miracle worker.-osyntaxโ Write output assyntax. Case is ignored. Valid values are:NQuads,NTriples,TriG,Turtle.-pprefixโ Addprefixto blank node IDs. This can be used to avoid clashes between blank node IDs in input documents. The effects can be reversed in a later run with-c. For example, with prefixdoc01, the blank node_:b42will be emitted as_:doc01b42.-qโ Suppress all output except data. Quiet luxury. ๐-rrootโ Keep relative URIs within a root URI. This will avoid creating any relative URI references with leading path segments like../that enter a parent ofroot.
For 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. ๐
-sstringโ Parsestringinput instead of a file (terminates options). Careful, she eats the rest of the args, fr fr.-vโ Display version information and exit. Slay and goodbye. ๐
โญ EXIT STATUS โญ
serdi exits with a status of 0, or non-zero if an error occurred. That's it, that's the vibe check.
๐ EXAMPLES ๐
Pretty-print a document:
serdi -o turtle file.ttl > out.ttl
Print any errors:
serdi file.ttl > /dev/null
๐ซถ SEE ALSO ๐ซถ
Go look at her house, bestie. ๐ก
๐ง STANDARDS ๐ง
- W3C, RDF 1.1 NQuads, February 2014. https://www.w3.org/TR/n-quads/
- W3C, RDF 1.1 NTriples, February 2014. https://www.w3.org/TR/n-triples/
- W3C, RDF 1.1 TriG, February 2014. https://www.w3.org/TR/trig/
- W3C, RDF 1.1 Turtle, February 2014. https://www.w3.org/TR/turtle/
Certified. Standards-approved. Periodt. ๐ฏ
๐ AUTHORS ๐
serdi is a part of serd, by David Robillard โจd@drobilla.netโฉ. King behavior. ๐ซก
and that's the whole page bestie, we ate and left no crumbs ๐โจ๐๐ฆ๐ธ
This one's from Debian, dated January 30, 2025, and it's the SERDI(1) page, so if you ever forget who she is, she's right there in section 1. Mwah. ๐
๐ฆ where this page comes from
- alpine 3.24: serd-doc 0.32.8-r0 ยท ISC
- arch rolling: serd 0.32.10-1 ยท 0BSD OR ISC AND BSD-3-Clause AND ISC
- epel 10: serd 0.32.8-1.el10_3 ยท ISC
- fedora 43: serd 0.32.8-1.fc43 ยท ISC
- fedora 43: serd 0.32.8-1.fc43 ยท ISC
- fedora 44: serd 0.32.8-1.fc44 ยท ISC
- fedora 44: serd 0.32.8-1.fc44 ยท ISC
- nixpkgs unstable: serd 0.32.10
- ubuntu resolute: serdi 0.32.6-1 ยท ISC
- ubuntu stonking: serdi 0.32.10-2 ยท ISC
- ๐ the page's license: ISC
- Copyright 2011-2025 David Robillard <d@drobilla.net>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms