rdfproc(1)
π NAME π
rdfproc β the Redland RDF processor utility π¦
she lives in section 1 of the General Commands Manual, and she is that girl when it comes to RDF. periodt π
β¨ SYNOPSIS β¨
rdfproc [options] store-name command arg...
πΈ EXAMPLE πΈ
like, here's the vibe, bestie:
rdfproc test parse http://planetrdf.com/guide/rss.rdf
rdfproc test print
rdfproc test serialize ntriples
π DESCRIPTION π
okay so the rdfproc utility is your bestie for parsing, querying, manipulating and serializing RDF content, all using the Redland RDF library. π₯
the store-name is a Redland store name β usually just a short identifier, nothing dramatic, she's lowkey iconic. and the arguments you pass to command? those change depending on which command you picked, and they're all spelled out in the COMMANDS section below. no cap. π
π OPTIONS π
rdfproc uses the usual GNU command line syntax, with long options starting with two dashes (-) if the getopt_long function supports it. otherwise, bestie, you only get the short options. π
-h,--helpβ shows you a summary of the options. your little cheat sheet β¨-c,--contextsβ use a store that has Redland contexts.-n,--newβ make a brand new store, and yes, it overwrites any existing one. she's not asking, she's telling. π-o,--output FORMATβ sets the outputFORMATfor sequences of triples, like the ones you get from a search (thefindcommand), handed off to a Redland serializer. use-hor-o helpto see the full list of supported formats. π-p,--passwordβ reads the storage option'password'from standard input. it's terminated by end of line ('\n') or end of file. this is equivalent to setting it using-tor--storage-options, but it does not require exposing the password in the argument list. your privacy? protected. π«Ά-q,--quietβ suppresses informational messages (the ones that go to stderr).-r,--results FORMATβ sets the query results syntax format. use-hor-r helpto see the full list of query result formats.
the exact list of formats depends on what libraptor(3) was built with, but it's given correctly in the usage message you get with -h. π
-s,--storage TYPEβ sets the Redland storage type (default is'hashes'). if the environment variableRDFPROC_STORAGE_TYPEis set, the storage type you give here overrides it. use-hor-s helpto see the full list of query result formats.-t,--storage-options OPTIONSβ sets options for the Redland storage. the default is"hash-type='bdb',dir='.'"to match the default storage"hashes". for storage types like'mysql'that need extra options, you'd typically do something like"host='hostname',database='dbname',user='abc',password='pass'". if the environment variableRDFPROC_STORAGE_OPTIONSis set, the storage options you give here are applied afterwards.-v,--versionβ prints the Redland version and exits. bye bestie π-V,--verboseβ shows informational messages on stderr. she's chatty fr fr π£οΈ
π COMMANDS π
so wherever a node is allowed β like NODE, SUBJECT, PREDICATE or OBJECT down below β there are simple heuristics doing the guessing about which ones are blank node identifiers, URIs or literals. (and heads up: to add a statement with a literal, use add-typed.) here's the tea:
- if the item starts with
_:then it's assumed to be a blank node identifier - otherwise, if it matches something:// it's assumed to be a URI
- otherwise it's a literal
and the rules: literals are only allowed as objects of statements, and blank nodes are not allowed as predicates. no exceptions, babe. π
add SUBJECT PREDICATE OBJECT [CONTEXT]β add the given triple to the graph, in the optional Redland context if theCONTEXTnode is given.add-typed SUBJECT PREDICATE OBJECT OBJECT-LANG OBJECT-URI [CONTEXT]β add the triple with the datatyped literal object to the graph, in the optional Redland context ifCONTEXTis given.arc SUBJECT OBJECT/arcs SUBJECT OBJECTβ show one node / all nodes that match triples(SUBJECT, ?, OBJECT). β¨arcs-in NODEβ show all properties of triples withNODEas a subject.arcs-out NODEβ show all properties of triples withNODEas an object.contains SUBJECT PREDICATE OBJECTβ check if the given triple is in the graph. yes or no, iconic behavior πcontextsβ list all the contexts in the graph (if contexts are enabled, obviously).find SUBJECT|- PREDICATE|- OBJECT|- [CONTEXT]β find matching triples to the given statement, where-stands for a blank that matches any node. ifCONTEXTis given, it only searches for triples in that context node.has-arc-in NODE ARCβ check that there is a triple withNODEas a subject andARCas a predicate.has-arc-out NODE ARCβ check that there is a triple withNODEas a object andARCas a predicate.parse URI|FILENAME [SYNTAX| [BASE URI]]β parse syntax atURIinto the graph usingSYNTAX, which can be one ofrdfxml(RDF/XML, default),ntriples,turtle,rss-tag-soup(for all RSS and Atoms),grddlandguessto use content hints and protocol information to work it out. (this list changes faster than this manual page, ngl π) ifFILENAMEis a existing file, the appropriate URI will be generated for it. if parsing returns errors, the return code will be non-0.parse-stream URI|FILENAME [SYNTAX [BASE URI [CONTEXT]]β streaming parse syntax atURIinto the graph usingSYNTAX, which can be one ofrdfxml(RDF/XML, default) orntriples. ifFILENAMEis an existing file, the appropriate URI will be generated for it. if the optionalCONTEXTURI is given, the triples are added to that context. if parsing returns errors, the return code will be non-0.printβ print the graph triples in a simple format, showing context nodes if present. πquery NAME|- URI|- QUERY-STRINGβ run theQUERY-STRINGquery in languageNAME, returning variable bindings, a boolean or an RDF graph depending on the query. the query language can be'sparql'or'rdql'.remove SUBJECT PREDICATE OBJECT [CONTEXT]β remove the given triple graph, in the optional Redland context ifCONTEXTis given. gone. bye. πremove-context CONTEXTβ remove all triples in the graph with the Redland contextCONTEXT.serialize [SYNTAX [URI [MIME-TYPE]]]β serializes the graph to a syntax with a particularISYNTAXURI or Internet Media Type/MIME Type. the default is RDF/XML (NAME"rdfxml", MIME Type"application/rdf/xml") if none of the above are given. other alternatives are"ntriples"(no MIME Type). β¨source PREDICATE OBJECT/sources PREDICATE OBJECTβ show one node / all nodes that match triples(?, PREDICATE, OBJECT).target SUBJECT PREDICATE/targets SUBJECT PREDICATEβ show one node / all nodes that match triples(SUBJECT, PREDICATE, ?).
π ENVIRONMENT π
RDFPROC_STORAGE_OPTIONScan be set to provide storage options instead of using the option-t,--storage-options OPTIONS. when both are given, the command options are applied last.RDFPROC_STORAGE_TYPEcan be set to provide a storage type instead of using the option-s,--storage TYPE. when both are given, the storage type from the command is used.
π¦ CONFORMING TO π¦
- RDF/XML Syntax (Revised), W3C Recommendation, http://www.w3.org/TR/rdf-syntax-grammar/
- N-Triples, in RDF Test Cases, Jan Grant and Dave Beckett (eds.) W3C Recommendation, http://www.w3.org/TR/rdf-testcases/#ntriples
π SEE ALSO π
redland(3), libraptor(3), rapper(1)
π AUTHOR π
Dave Beckett β http://www.dajobe.org/
and that's the whole page bestie, you ate that π«Ά
this was the rdfproc(1) page from the General Commands Manual, dated 2010-08-29. go forth and process some RDF. mwah π
π¦ where this page comes from
- alpine 3.24: redland-doc 1.0.17-r3 Β· LGPL-2.1-or-later
- centos-stream 9: redland 1.0.17-29.el9 Β· LGPLv2+ or ASL 2.0
- centos-stream 9: redland 1.0.17-29.el9 Β· LGPLv2+ or ASL 2.0
- debian bookworm: redland-utils 1.0.17-3
- debian trixie: redland-utils 1.0.17-4+b1
- fedora 43: redland 1.0.17-40.fc43 Β· LGPL-2.1-or-later OR Apache-2.0
- fedora 43: redland 1.0.17-40.fc43 Β· LGPL-2.1-or-later OR Apache-2.0
- fedora 44: redland 1.0.17-41.fc44 Β· LGPL-2.1-or-later OR Apache-2.0
- fedora 44: redland 1.0.17-41.fc44 Β· LGPL-2.1-or-later OR Apache-2.0
- nixos 26.05: redland 1.0.17
- nixpkgs unstable: redland 1.0.17
- opensuse-leap 16.0: redland 1.0.17-bp160.1.10 Β· Apache-2.0 AND LGPL-2.1-or-later
- opensuse-leap 16.0: redland 1.0.17-bp160.1.10 Β· Apache-2.0 AND LGPL-2.1-or-later
- opensuse-leap 16.0: redland 1.0.17-bp160.1.10 Β· Apache-2.0 AND LGPL-2.1-or-later
- opensuse-leap 16.0: redland 1.0.17-bp160.1.10 Β· Apache-2.0 AND LGPL-2.1-or-later
- ubuntu jammy: redland-utils 1.0.17-1.1ubuntu3
- ubuntu noble: redland-utils 1.0.17-3.1ubuntu3
- ubuntu questing: redland-utils 1.0.17-4ubuntu2
- ubuntu resolute: redland-utils 1.0.17-8
- ubuntu stonking: redland-utils 1.0.17-10 Β· LGPL-2.1-or-later OR Apache-2.0
- Copyright (C) 2003-2010 David Beckett - http://www.dajobe.org/
- Copyright (C) 2003-2005 University of Bristol - http://www.bristol.ac.uk/
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms