.. _corese-command-convert: convert ======= The ``convert`` command allows converting RDF files from one format to another. **Usage:** .. code-block:: bash corese-command convert [-hvw] [-i=] [-f=] [-c=] [-o[=]] -r= **Options and arguments:** - `-r`, `-of`, `\-\-result-format` `` : Required output format. Supported output formats are listed :ref:`below `. - `-i`, `\-\-input-data` `` : Optional path to a file or URL containing the RDF data. Default: standard input. - `-f`, `-if`, `\-\-input-format` `` : Input format is automatically detected for files. Use this option with the standard input or if you want to force the input file format. Supported input formats are listed :ref:`below `. - `-o`, `\-\-output-data` `` : Optional path to save the converted results. Default: standard output. - `-c`, `\-\-config`, `\-\-init` `` : Optional path to the configuration file. - `-w`, `\-\-no-owl-import` : Disables the automatic import of referenced ontologies specified in 'owl:imports' statements in the `profile.ttl` file. Default: enabled. - `-v`, `\-\-verbose` : Display verbose output. - `-h`, `\-\-help`: Display `sparql` comamnd options. **Example:** To run this example you can download the sample data file :download:`beatles.rdf <../_static/data/beatles.rdf>`. .. code-block:: bash corese-command convert -i beatles.rdf -r turtle .. code-block:: turtle @prefix xsd: . @prefix ns1: . @prefix rdf: . ns1:Love_Me_Do ns1:length 125 ; ns1:name "Love Me Do" ; ns1:writer ns1:John_Lennon ; ns1:writer ns1:Paul_McCartney ; a ns1:Song . ns1:Please_Please_Me ns1:artist ns1:The_Beatles ; ns1:date "1963-03-22"^^xsd:date ; ns1:name "Please Please Me" ; ns1:track ns1:Love_Me_Do ; a ns1:Album . ... For more examples, see the `Getting Started Guide <../getting%20started/Getting%20Started%20With%20Corese-command.html#the-convert-command>`_. .. _corese-command-convert-input-formats: Input formats ^^^^^^^^^^^^^^^^ - RDF/XML: `rdfxml`, `rdf` or `application/rdf+xml` - Turtle: `turtle`, `ttl` or `text/turtle` - TriG: `trig` or `application/trig` - JSON-LD: `jsonld` or `application/ld+json` - NTRIPLES: `ntriples`, `nt` or `application/n-triples` - NQUADS: `nquads`, `nq`, or `application/n-quads` - RDFa/HTML: `rdfa`, `html`, `application/xhtml+xml` .. _corese-command-convert-output-formats: Output formats ^^^^^^^^^^^^^^ - RDF/XML: `rdfxml`, `rdf` or `application/rdf+xml` - Turtle: `turtle`, `ttl` or `text/turtle` - TriG: `trig` or `application/trig` - JSON-LD: `jsonld` or `application/ld+json` - NTRIPLES: `ntriples`, `nt` or `application/n-triples` - NQUADS: `nquads`, `nq`, or `application/n-quads` - RDFC: `rdfc-1.0`, `rdfc-1.0-sha256`, `rdfc-1.0-sha384`