Hi Frans,

See "riot --help" for your version.
https://jena.apache.org/documentation/io/#command-line-tools

Currently:

--output=FMT
           Output in the given format, streaming if possible.
--formatted=FMT
        Output, using pretty printing (consumes memory)
--stream=FMT
           Output, using a streaming format

and make FMT "TTL"

Note that --formatted (the prettiest) has to read all input into memory before printing begins which can be an issue at large scale, the other forms don't need this.

To set particular prefixes when the data does provide them, add your own Turtle file with just prefixes in it.

riot --formatted=TTL myprefixes.ttl data...data 2>/dev/null

    Andy

On 06/09/16 10:38, Frans Knibbe wrote:
Hello,

I use riot to convert RDF files to different formats on the command line.
It works well, but I wonder if there is an option to have @base and @prefix
definitions in the output in turtle format. In many cases that would result
in more compact files that are easier to read for humans.

I can image riot could identify repeating URI prefixes itself, or perhaps a
file with  @prefix definitions could be supplied as a parameter...

As for @base, I see that there is a parameter --base=URI for riot. But
using it does not seem to give an @base in turtle output.

Greetings,
Frans

Reply via email to