1rapper(1) General Commands Manual rapper(1)
2
3
4
6 rapper - Raptor RDF parsing and serializing utility
7
9 rapper [OPTIONS] INPUT-URI [INPUT-BASE-URI]
10
12 rapper -o ntriples http://planetrdf.com/guide/rss.rdf
13 rapper -i rss-tag-soup -o rss-1.0 pile-of-rss.xml http://example.org/base/
14 rapper --count http://example.org/index.rdf
15
17 The rapper utility allows parsing of RDF content by the Raptor RDF
18 parser toolkit emitting the results as RDF triples in a choice of syn‐
19 taxes. The INPUT-URI can be a file name, '-' for standard input or if
20 Raptor is built with a WWW retrieval library, a general URI. The
21 optional INPUT-BASE-URI is used as the document parser base URI if
22 present otherwise defaults to the INPUT-URI. A value of '-' means no
23 base URI.
24
26 rapper uses the usual GNU command line syntax, with long options start‐
27 ing with two dashes (`-') if supported by the getopt_long function.
28 Otherwise the short options are only available.
29
30 -h, --help
31 Show a summary of the options.
32
33 -i, --input FORMAT
34 Set the input FORMAT to one of 'rdfxml' (RDF/XML, default),
35 'ntriples' (N-Triples, see below), 'turtle' (Turtle, see below)
36 or 'rss-tag-soup' (RSS Tag Soup). The RSS Tag Soup parser can
37 turn the many XML RSS formats and Atom 0.3 into RDF triples.
38
39 The list of parsers depends on how libraptor(3) was built. The
40 list of supported parsers is given in the help summary given by
41 -h.
42
43 -I, --input-uri URI
44 Set the input/parser base URI or use value '-' for no base. The
45 default is the INPUT-URI argument value.
46
47 -o, --output FORMAT
48 Set the output FORMAT to 'ntriples' (N-Triples, default),
49 'rdfxml' (RDF/XML), 'rdfxml-abbrev' (RDF/XML with abbreviations)
50 or 'rss-1.0' (RSS 1.0, also an RDF/XML syntax).
51
52 The list of serializers depends on how libraptor(3) was built.
53 The list of supported serializers is given in the help summary
54 given by -h.
55
56 -O, --output-uri URI
57 Set the output/serializer base URI or use value '-' for no base.
58 The default is the input base uri, either set by the argument
59 INPUT-BASE-URI or via options -I, --input-uri URI
60
61 -c, --count
62 Only count the triples and produce no other output.
63
64 -e, --ignore-errors
65 Ignore errors, do not emit the messages and try to continue
66 parsing.
67
68 -f, --feature FEATURE[=VALUE]
69 Set a parser or serializer feature FEATURE to a value, or to 1
70 if VALUE is omitted, Use -f help to get lists of valid parser
71 and serializer features.
72
73 If the form -f 'xmlns:prefix="uri"' is used, the prefix and
74 namespace uri given will be set for serializing. The syntax
75 matches XML in that either or both of prefix or uri can be omit‐
76 ted.
77
78 -g, --guess
79 Guess the parser to use from the source-URI rather than use the
80 -i FORMAT.
81
82 -q, --quiet
83 No extra information messages.
84
85 -r, --replace-newlines
86 Replace newlines in multi-line literals with spaces.
87
88 --show-graphs
89 Print graph names (URIs) as they are seen in the input. This
90 only has a meaning for parsers that support graph names such as
91 the TRiG parser.
92
93 --show-namespaces
94 Print namespaces as they are seen in the input.
95
96 -t, --trace
97 Print URIs retrieved during parsing. Especially useful for mon‐
98 itoring what the guess and GRDDL parsers are doing.
99
100 -w, --ignore-warnings
101 Ignore warnings, do not emit the messages.
102
103 -v, --version
104 Print the raptor version and exit.
105
107 rapper -q -i ntriples -o rdfxml -f
108 'xmlns:rss="http://purl.org/rss/1.0/"' -f 'xmlns:ex="http://exam‐
109 ple.org/"' tests/test.nt
110 rapper -q -o rdfxml -f 'xmlns:rdfs="http://www.w3.org/2000/01/rdf-
111 schema#"' tests/rdf-schema.rdf 'http://www.w3.org/2000/01/rdf-schema#'
112
114 RDF/XML Syntax (Revised), W3C Recommendation, http://www.w3.org/TR/rdf-
115 syntax-grammar/ ⟨http://www.w3.org/TR/rdf-syntax-grammar/⟩
116
117 N-Triples, in RDF Test Cases, Jan Grant and Dave Beckett (eds.), W3C
118 Recommendation, http://www.w3.org/TR/rdf-testcases/#ntriples
119 ⟨http://www.w3.org/TR/rdf-testcases/#ntriples⟩
120
121 Turtle Terse RDF Triple Language, Dave Beckett,
122 http://www.dajobe.org/2004/01/turtle/
123 ⟨http://www.dajobe.org/2004/01/turtle/⟩
124
125 RDFA in XHTML: Syntax and Processing, Ben Adida, Mark Birbeck, Shane
126 McCarron and Steven Pemberton (eds.), W3C Candidate Recommendation, 20
127 June 2008 http://www.w3.org/TR/2008/CR-rdfa-syntax-20080620/
128 ⟨http://www.w3.org/TR/2008/CR-rdfa-syntax-20080620/⟩
129
130 RDF Site Summary (RSS) 1.0, 2000-12-06 http://purl.org/rss/1.0/spec
131 ⟨http://purl.org/rss/1.0/spec⟩
132
134 libraptor(3),[22mraptor-config(1)
135
137 2.0.0
138 Removed -a option that did nothing.
139
140 Removed -m option from rapper but it was never documented here.
141
142 Removed -n option that was long hidden.
143
144 Removed -s option that was equivalent to -f scanForRDF
145
146 1.4.16
147 Added -I/--input-uri and -O/--output-uri to set the input and output
148 (parser and serializer) base URIs separately.
149
150 1.4.15
151 Added -t/--trace to do URI traces.
152
153 1.4.5
154 Updated to add serializer rdfxml-abbrev
155
156 1.4.3
157 Updated potential parser and serializers and described -f for defining
158 namespaces.
159
160 1.3.0
161 Added -f for features.
162 Added -g for guessing the parser to use.
163
164 1.1.0
165 Removed -a, --assume since rdf:RDF is now always optional.
166
168 Dave Beckett - http://www.dajobe.org/ ⟨http://www.dajobe.org/⟩
169
170
171
172 2010-04-28 rapper(1)