aboutsummaryrefslogtreecommitdiffstats
path: root/doc/serdi.1
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-07-27 19:01:45 -0400
committerDavid Robillard <d@drobilla.net>2022-01-14 19:37:51 -0500
commit1159aea45d9bc4ade2e82856be403d58e050f32d (patch)
tree870117b2a0a4b386727107bd85c736a020058309 /doc/serdi.1
parent89612ec05f596d135640413e093251fb9691ca14 (diff)
downloadserd-1159aea45d9bc4ade2e82856be403d58e050f32d.tar.gz
serd-1159aea45d9bc4ade2e82856be403d58e050f32d.tar.bz2
serd-1159aea45d9bc4ade2e82856be403d58e050f32d.zip
Add statement filtering
Diffstat (limited to 'doc/serdi.1')
-rw-r--r--doc/serdi.128
1 files changed, 27 insertions, 1 deletions
diff --git a/doc/serdi.1 b/doc/serdi.1
index 59eb67ce..2a110785 100644
--- a/doc/serdi.1
+++ b/doc/serdi.1
@@ -3,10 +3,11 @@
.Os Serd 0.30.11
.Sh NAME
.Nm serdi
-.Nd read, transform, and write RDF data
+.Nd read, filter, transform, and write RDF data
.Sh SYNOPSIS
.Nm serdi
.Op Fl Cabefhlmqtvx
+.Op Fl F Ar pattern | Fl G Ar pattern
.Op Fl I Ar base
.Op Fl c Ar prefix
.Op Fl i Ar syntax
@@ -47,6 +48,23 @@ All numeric datatypes are supported, as well as
and
.Vt base64Binary .
.Pp
+.It Fl F Ar pattern
+Filter out statements that match
+.Ar pattern .
+The pattern must be a single statement written in NTriples or NQuads,
+with variables like
+.Dq ?name
+for wildcards.
+The names of variables in the pattern are insignificant.
+.Pp
+.It Fl G Ar pattern
+Only include statements that match
+.Ar pattern .
+This option is like
+.Fl p
+but inverted,
+so that only matching statements are included, like grep.
+.Pp
.It Fl I Ar base
Input base URI.
Relative URI references in the input will be resolved against this.
@@ -180,6 +198,14 @@ To pretty-print a document:
To print any errors:
.Pp
.Dl $ serdi file.ttl > /dev/null
+.Pp
+To remove any rdf:type properties:
+.Pp
+.Dl $ serdi -F \(dq?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?o .\(dq file.ttl
+.Pp
+To include only rdf:type properties:
+.Pp
+.Dl $ serdi -G \(dq?s <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?o .\(dq file.ttl
.Sh SEE ALSO
.Bl -item -compact
.It