diff options
author | David Robillard <d@drobilla.net> | 2023-03-31 20:32:26 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 18:49:08 -0500 |
commit | 0db18e483f11ac2f9518d96e137d217040ed1339 (patch) | |
tree | 8c1c77bdae31d55f311c89356483e873be81bb90 /tools | |
parent | a1b677851274b7e5295962658e723cab007f9b85 (diff) | |
download | serd-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 'tools')
-rw-r--r-- | tools/console.c | 1 | ||||
-rw-r--r-- | tools/serd-filter.c | 2 | ||||
-rw-r--r-- | tools/serd-pipe.c | 2 | ||||
-rw-r--r-- | tools/serd-sort.c | 2 |
4 files changed, 4 insertions, 3 deletions
diff --git a/tools/console.c b/tools/console.c index 2a396af0..94d9a0c5 100644 --- a/tools/console.c +++ b/tools/console.c @@ -325,6 +325,7 @@ serd_set_output_option(const SerdStringView name, static const OutputOption output_options[] = { {"ascii", SERD_WRITE_ASCII}, + {"contextual", SERD_WRITE_CONTEXTUAL}, {"expanded", SERD_WRITE_EXPANDED}, {"lax", SERD_WRITE_LAX}, {"longhand", SERD_WRITE_LONGHAND}, diff --git a/tools/serd-filter.c b/tools/serd-filter.c index 70d7b68c..53424e62 100644 --- a/tools/serd-filter.c +++ b/tools/serd-filter.c @@ -213,7 +213,7 @@ print_usage(const char* const name, const bool error) " -I SYNTAX Input syntax turtle/ntriples/trig/nquads, or option\n" " lax/variables/relative/global/generated.\n" " -O SYNTAX Output syntax empty/turtle/ntriples/nquads, or option\n" - " ascii/expanded/verbatim/terse/lax.\n" + " ascii/contextual/expanded/verbatim/terse/lax.\n" " -V Display version information and exit.\n" " -f PATTERN_FILE Read pattern from PATTERN_FILE instead.\n" " -h Display this help and exit.\n" diff --git a/tools/serd-pipe.c b/tools/serd-pipe.c index fb1586b4..569119fb 100644 --- a/tools/serd-pipe.c +++ b/tools/serd-pipe.c @@ -102,7 +102,7 @@ print_usage(const char* const name, const bool error) " -I SYNTAX Input syntax turtle/ntriples/trig/nquads, or option\n" " lax/variables/relative/global/generated.\n" " -O SYNTAX Output syntax empty/turtle/ntriples/nquads, or option\n" - " ascii/expanded/verbatim/terse/lax.\n" + " ascii/contextual/expanded/verbatim/terse/lax.\n" " -R ROOT_URI Keep relative URIs within ROOT_URI.\n" " -V Display version information and exit.\n" " -b BYTES I/O block size.\n" diff --git a/tools/serd-sort.c b/tools/serd-sort.c index 3b9c829a..75fb781c 100644 --- a/tools/serd-sort.c +++ b/tools/serd-sort.c @@ -172,7 +172,7 @@ print_usage(const char* const name, const bool error) " -I SYNTAX Input syntax turtle/ntriples/trig/nquads, or option\n" " lax/variables/relative/global/generated.\n" " -O SYNTAX Output syntax empty/turtle/ntriples/nquads, or option\n" - " ascii/expanded/verbatim/terse/lax.\n" + " ascii/contextual/expanded/verbatim/terse/lax.\n" " -V Display version information and exit.\n" " -b BYTES I/O block size.\n" " -c COLLATION An optional \"G\" then the letters \"SPO\" in any order.\n" |