rapper(1)

๐Ÿ“ฆ
version 2.0.16 ยท 2 versions
, in alpine 3.24, arch rolling, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

โœจ NAME โœจ

okay so bestie, meet rapper โ€” the Raptor RDF parsing and serializing utility. it's the command-line bestie of the Raptor toolkit and she eats RDF for breakfast ๐Ÿ’… (this is the rapper(1) page, general commands manual energy, iykyk).


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

rapper [OPTIONS] INPUT-URI [INPUT-BASE-URI]

๐ŸŒธ EXAMPLE ๐ŸŒธ

rapper -o ntriples http://planetrdf.com/guide/rss.rdf
rapper -i rss-tag-soup -o rss-1.0 pile-of-rss.xml http://example.org/base/
rapper --count http://example.org/index.rdf

๐Ÿ’– DESCRIPTION ๐Ÿ’–

so the rapper utility lets you parse RDF content using the Raptor RDF parser toolkit, and it emits the results as RDF triples in whichever syntax you pick. choose your own adventure, no cap โœจ

the INPUT-URI can be:

  • a file name
  • - for standard input
  • or, if Raptor was built with a WWW retrieval library, a general URI

the optional INPUT-BASE-URI gets used as the document parser base URI if you give it โ€” otherwise it defaults to the INPUT-URI. and a value of - means no base URI. that's it, that's the vibe ๐Ÿซถ


๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

rapper uses the usual GNU command line syntax, with long options starting with two dashes (`-') if supported by the getopt_long function. otherwise? short options only, bestie. that's just how it is ๐Ÿ™ˆ

  • -h, --help โ€” show a summary of the options. (the lil cheat sheet, highly recommend)
  • -i, --input FORMAT โ€” set the input FORMAT to one of 'rdfxml' (RDF/XML, and that's the default), 'ntriples' (N-Triples, see below), 'turtle' (Turtle, see below) or 'rss-tag-soup' (RSS Tag Soup). and okay the RSS Tag Soup parser is genuinely iconic โ€” it can turn the many XML RSS formats, Atom 0.3 and Atom 1.0 into RDF triples. obsessed. the list of parsers depends on how libraptor(3) was built, and the list of supported parsers is given in the help summary given by -h.
  • -I, --input-uri URI โ€” set the input/parser base URI, or use the value - for no base. the default is the INPUT-URI argument value.
  • -o, --output FORMAT โ€” set the output FORMAT to 'ntriples' (N-Triples, and yes that's the default), 'rdfxml' (RDF/XML), 'rdfxml-abbrev' (RDF/XML with abbreviations) or 'rss-1.0' (RSS 1.0, which is also an RDF/XML syntax). the list of serializers depends on how libraptor(3) was built, and the list of supported serializers is given in the help summary given by -h.
  • -O, --output-uri URI โ€” set the output/serializer base URI, or use the value - for no base. the default is the input base uri, either set by the argument INPUT-BASE-URI or via options -I, --input-uri URI.
  • -c, --count โ€” only count the triples and produce no other output. just the number, main character minimalism โœจ
  • -e, --ignore-errors โ€” ignore errors, do not emit the messages and try to continue parsing.
  • -f, --feature FEATURE[=VALUE] โ€” set a parser or serializer feature FEATURE to a value, or to 1 if VALUE is omitted. use -f help to get lists of valid parser and serializer features. if the form -f 'xmlns:prefix="uri"' is used, the prefix and namespace uri given will be set for serializing. the syntax matches XML in that either or both of prefix or uri can be omitted.
  • -g, --guess โ€” guess the parser to use from the source-URI rather than use the -i FORMAT. she's psychic, she's thriving ๐Ÿ”ฎ
  • -q, --quiet โ€” no extra information messages.
  • -r, --replace-newlines โ€” replace newlines in multi-line literals with spaces.
  • --show-graphs โ€” print graph names (URIs) as they are seen in the input. this only has a meaning for parsers that support graph names such as the TRiG parser.
  • --show-namespaces โ€” print namespaces as they are seen in the input.
  • -t, --trace โ€” print URIs retrieved during parsing. especially useful for monitoring what the guess and GRDDL parsers are doing. peak detective behavior ๐Ÿ•ต๏ธ
  • -w, --ignore-warnings โ€” ignore warnings, do not emit the messages.
  • -v, --version โ€” print the raptor version and exit.

๐ŸŒˆ EXAMPLES ๐ŸŒˆ

rapper -q -i ntriples -o rdfxml -f
'xmlns:rss="http://purl.org/rss/1.0/"' -f
'xmlns:ex="http://example.org/"' tests/test.nt
rapper -q -o rdfxml -f 'xmlns:rdfs="http://www.w3.org/2000/01/rdf-
schema#"' tests/rdf-schema.rdf 'http://www.w3.org/2000/01/rdf-schema#'

๐ŸŽ€ CONFORMING TO ๐ŸŽ€


๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

libraptor(3), raptor-config(1)


๐Ÿ’œ CHANGES ๐Ÿ’œ

2.0.0

  • removed -a option that did nothing. (why was she there. nobody knows ๐Ÿ’€)
  • removed -m option from rapper but it was never documented here.
  • removed -n option that was long hidden.
  • removed -s option that was equivalent to -f scanForRDF

1.4.16

  • added -I/--input-uri and -O/--output-uri to set the input and output (parser and serializer) base URIs separately.

1.4.15

  • added -t/--trace to do URI traces.

1.4.5

  • updated to add serializer rdfxml-abbrev

1.4.3

  • updated potential parser and serializers and described -f for defining namespaces.

1.3.0

  • added -f for features.
  • added -g for guessing the parser to use.

1.1.0

  • removed -a, --assume since rdf:RDF is now always optional.

๐Ÿซถ AUTHOR ๐Ÿซถ

Dave Beckett - http://www.dajobe.org/


and that's the whole page bestie, you're literally a rapper expert now, no notes ๐Ÿ’…โœจ

okay so this absolute classic of a manual page is dated 2010-04-28 and it's the rapper(1) page from the general commands manual โ€” go forth and parse, queen ๐Ÿ‘‘๐ŸŒธ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from