diff options
author | David Robillard <d@drobilla.net> | 2021-07-27 19:01:45 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-01-14 19:37:51 -0500 |
commit | 1159aea45d9bc4ade2e82856be403d58e050f32d (patch) | |
tree | 870117b2a0a4b386727107bd85c736a020058309 /doc | |
parent | 89612ec05f596d135640413e093251fb9691ca14 (diff) | |
download | serd-1159aea45d9bc4ade2e82856be403d58e050f32d.tar.gz serd-1159aea45d9bc4ade2e82856be403d58e050f32d.tar.bz2 serd-1159aea45d9bc4ade2e82856be403d58e050f32d.zip |
Add statement filtering
Diffstat (limited to 'doc')
-rw-r--r-- | doc/serdi.1 | 28 |
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 |