aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-03-31 20:32:26 -0400
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:08 -0500
commit0db18e483f11ac2f9518d96e137d217040ed1339 (patch)
tree8c1c77bdae31d55f311c89356483e873be81bb90 /doc
parenta1b677851274b7e5295962658e723cab007f9b85 (diff)
downloadserd-0db18e483f11ac2f9518d96e137d217040ed1339.tar.gz
serd-0db18e483f11ac2f9518d96e137d217040ed1339.tar.bz2
serd-0db18e483f11ac2f9518d96e137d217040ed1339.zip
Add "contextual" output option
This is mainly for developer or power-user cases, where one wants to look at some data for investigation or debugging. In such cases, it's common for the set of prefixes to be implicitly known (because they are baked in to the application, for example), so printing them just produces a large amount of redundant noise. That said, it can also be useful programmatically, because it allows several snippets to be written independently and ultimately concatenated (with a header to define the prefixes) without redundancy.
Diffstat (limited to 'doc')
-rw-r--r--doc/man/serd-filter.11
-rw-r--r--doc/man/serd-pipe.17
-rw-r--r--doc/man/serd-sort.11
3 files changed, 9 insertions, 0 deletions
diff --git a/doc/man/serd-filter.1 b/doc/man/serd-filter.1
index ff076b97..08c851de 100644
--- a/doc/man/serd-filter.1
+++ b/doc/man/serd-filter.1
@@ -74,6 +74,7 @@ Output syntax or option:
.Cm TriG ,
.Cm Turtle ,
.Cm ascii ,
+.Cm contextual ,
.Cm expanded ,
.Cm verbatim ,
.Cm terse ,
diff --git a/doc/man/serd-pipe.1 b/doc/man/serd-pipe.1
index a5dbd328..54e3a3b1 100644
--- a/doc/man/serd-pipe.1
+++ b/doc/man/serd-pipe.1
@@ -168,6 +168,13 @@ or an option:
.Bl -tag -width 3n
.It Cm ascii
Escape all non-ASCII characters.
+.It Cm contextual
+Suppress writing directives that describe the context.
+Normally when writing Turtle or Trig,
+a document will have a header that defines all the prefixes used in the input.
+This flag will disable writing those directives,
+so the output is document fragment with an implicit context.
+This can be useful for writing output intended for humans.
.It Cm expanded
Write expanded URIs instead of prefixed names.
.It Cm lax
diff --git a/doc/man/serd-sort.1 b/doc/man/serd-sort.1
index 1484d67e..ede0dd58 100644
--- a/doc/man/serd-sort.1
+++ b/doc/man/serd-sort.1
@@ -66,6 +66,7 @@ Output syntax or option:
.Cm TriG ,
.Cm Turtle ,
.Cm ascii ,
+.Cm contextual ,
.Cm expanded ,
.Cm verbatim ,
.Cm terse ,