Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cns-iu/rdf-formatter
A CLI for converting between RDF formats
https://github.com/cns-iu/rdf-formatter
Last synced: about 1 month ago
JSON representation
A CLI for converting between RDF formats
- Host: GitHub
- URL: https://github.com/cns-iu/rdf-formatter
- Owner: cns-iu
- License: mit
- Created: 2023-08-17T20:18:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-02T12:16:31.000Z (over 1 year ago)
- Last Synced: 2024-10-29T00:42:49.316Z (2 months ago)
- Language: JavaScript
- Size: 63.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rdf-formatter
A CLI for converting between RDF formats. RDF Formatter uses the parsers and serializers available in [@rdfjs-elements/formats-pretty](https://www.npmjs.com/package/@rdfjs-elements/formats-pretty), [@rdfjs/formats-common](https://www.npmjs.com/package/@rdfjs/formats-common), and [rdfa-streaming-parser](https://www.npmjs.com/package/rdfa-streaming-parser) to make a unix command-line friendly CLI application. See [Usage](#usage) below for supported RDF formats.
[![npm version](https://badge.fury.io/js/rdf-formatter.svg)](https://badge.fury.io/js/rdf-formatter) ![npm](https://img.shields.io/npm/l/rdf-formatter)
## Installation
You can install globally via npm: `npm install -g rdf-formatter`. Afterwards, the `rdf-formatter` CLI will be available on command-line.
## Usage
```bash
Usage: rdf-formatter [options]A CLI for converting between RDF formats
Supported RDF formats:
Extension Mimetype
.json-ld application/ld+json
.jsonld application/ld+json
.json application/ld+json
.nt application/n-triples
.nq application/n-quads
.n3 text/n3
.owl application/rdf+xml
.rdf application/rdf+xml
.xml application/rdf+xml
.trig application/trig
.turtle text/turtle
.ttl text/turtle
.html text/html (RDFa - only as an input format)
.htm text/html (RDFa - only as an input format)Arguments:
inputFile The input file in an RDF format, use - for stdin
outputFile The output file in an RDF format, use - for stdoutOptions:
-i, --input-type Input RDF format mimetype, will guess from file extension otherwise.
-o, --output-type Output RDF format mimetype, will guess from file extension otherwise.
--prefixes JSON file with prefixes to use in formatting
--ns [prefix...] Add an individual namespace prefix using format: prefixname=http://ex.com/
--pretty Use pretty print formatting
-h, --help display help for command
```