aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-09-04 15:03:11 -0400
committerDavid Robillard <d@drobilla.net>2022-01-28 21:57:07 -0500
commit1fb84760a8230637a806e8e83410fc7fb6d446d2 (patch)
tree47ec80aef823da8d5c840cd053e4189dcabc8258 /doc
parentb3892cb6e4963e1bbeb346a8124101b7c3cf379b (diff)
downloadserd-1fb84760a8230637a806e8e83410fc7fb6d446d2.tar.gz
serd-1fb84760a8230637a806e8e83410fc7fb6d446d2.tar.bz2
serd-1fb84760a8230637a806e8e83410fc7fb6d446d2.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/serd-filter.11
-rw-r--r--doc/serd-pipe.110
-rw-r--r--doc/serd-sort.11
3 files changed, 11 insertions, 1 deletions
diff --git a/doc/serd-filter.1 b/doc/serd-filter.1
index 983c1969..0f09d1d4 100644
--- a/doc/serd-filter.1
+++ b/doc/serd-filter.1
@@ -85,6 +85,7 @@ Output syntax or option:
.Cm TriG ,
.Cm Turtle ,
.Cm ascii ,
+.Cm contextual ,
.Cm expanded ,
.Cm verbatim ,
.Cm terse ,
diff --git a/doc/serd-pipe.1 b/doc/serd-pipe.1
index c7f77c9e..28f1373d 100644
--- a/doc/serd-pipe.1
+++ b/doc/serd-pipe.1
@@ -170,7 +170,7 @@ can be
.Cm Turtle ,
or one of the following options:
.Pp
-.Bl -tag -width "QverbatimQ" -compact -offset indent
+.Bl -tag -width "QcontextualQ" -compact -offset indent
.It Cm ascii
Escape all non-ASCII characters.
Normally, text is written in UTF-8.
@@ -178,6 +178,14 @@ This flag will escape non-ASCII characters in text as Unicode code points like
.Li \eU00B7 or
.Li \eU0001F600 .
.Pp
+.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.
+.Pp
.It Cm expanded
Write expanded URIs instead of prefixed names.
.Pp
diff --git a/doc/serd-sort.1 b/doc/serd-sort.1
index 350d70cd..3249fbbc 100644
--- a/doc/serd-sort.1
+++ b/doc/serd-sort.1
@@ -72,6 +72,7 @@ Output syntax or option:
.Cm TriG ,
.Cm Turtle ,
.Cm ascii ,
+.Cm contextual ,
.Cm expanded ,
.Cm verbatim ,
.Cm terse ,