Raptor is library that provides a set of parsers and serializers that generate RDF triples by parsing syntaxes or serialize the triples into a syntax.
The supported parsing syntaxes are RDF/XML, N-Quads, N-Triples 1.0 and 1.1, TRiG, Turtle 2008 and 2013, RDFa 1.0 and 1.1, RSS tag soup including all versions of RSS, Atom 1.0 and 0.3, GRDDL and microformats for HTML, XHTML and XML. The serializing syntaxes are RDF/XML (regular, abbreviated, XMP), Turtle 2013, N-Quads, N-Triples 1.1, Atom 1.0, RSS 1.0, GraphViz DOT, HTML, JSON and mKR.
The following command can be run to convert the local Turtle file sample.ttl into the N-triples file output.nt
docker container run --rm -v "$(pwd)/:/tmp/" semmtech/raptor -i turtle -o ntriples /tmp/input.ttl > output.nt
The following can be viewed by running with --help
Raptor RDF syntax parsing and serializing utility 2.0.15
Parse RDF syntax from a source into serialized RDF triples.
Usage: rapper [OPTIONS] INPUT-URI [INPUT-BASE-URI]
Copyright (C) 2000-2014 David Beckett - http://www.dajobe.org/
Copyright (C) 2000-2005 University of Bristol - http://www.bristol.ac.uk/
License: LGPL 2.1 or newer, GPL 2 or newer, Apache 2.0 or newer.
See http://librdf.org/raptor/LICENSE.html for full terms.
Raptor home page: http://librdf.org/raptor/
Arguments:
INPUT-URI a filename, URI or '-' for standard input (stdin).
INPUT-BASE-URI the input/parser base URI or '-' for none.
Default is INPUT-URI
Equivalent to "-I INPUT-BASE-URI" or "--input-uri INPUT-BASE-URI"
Main options:
-i FORMAT, --input FORMAT Set the input format/parser to one of:
rdfxml RDF/XML (default)
ntriples N-Triples
turtle Turtle Terse RDF Triple Language
trig TriG - Turtle with Named Graphs
rss-tag-soup RSS Tag Soup
guess Pick the parser to use using content type and URI
rdfa RDF/A via librdfa
nquads N-Quads
-I URI, --input-uri URI Set the input/parser base URI. '-' for none.
Default is INPUT-BASE-URI argument value.
-o FORMAT, --output FORMAT Set the output format/serializer to one of:
ntriples N-Triples (default)
turtle Turtle Terse RDF Triple Language
rdfxml-xmp RDF/XML (XMP Profile)
rdfxml-abbrev RDF/XML (Abbreviated)
rdfxml RDF/XML
rss-1.0 RSS 1.0
atom Atom 1.0
dot GraphViz DOT format
json-triples RDF/JSON Triples
json RDF/JSON Resource-Centric
html HTML Table
nquads N-Quads
-O URI, --output-uri URI Set the output/serializer base URI. '-' for none.
Default is input/parser base URI.
General options:
-c, --count Count triples only - do not print them.
-e, --ignore-errors Ignore error messages
-f OPTION(=VALUE), --feature OPTION(=VALUE)
Set parser or serializer options
Use `-f help' for a list of valid options
-g, --guess Guess the input syntax (same as -i guess)
-h, --help Print this help, then exit
-q, --quiet No extra information messages
-r, --replace-newlines Replace newlines with spaces in literals
--show-graphs Show named graphs as they are declared
--show-namespaces Show namespaces as they are declared
-t, --trace Trace URIs retrieved during parsing
-w, --ignore-warnings Ignore warning messages
-v, --version Print the Raptor version
Content type
Image
Digest
Size
68.6 MB
Last updated
over 5 years ago
docker pull semmtech/raptor