pyld to-rdf¶
Requires pip install PyLD[cli]
Convert JSON-LD to raw N-Quads. INPUT accepts a path, URL, or -.
pyld to-rdf --help
Usage: pyld to-rdf [OPTIONS] {INPUT}
Convert a JSON-LD document to N-Quads.
╭─ Arguments ──────────────────────────────────────────────────────────────────────────╮
│ * INPUT <str> Path or HTTP(S) URL. Pass - to read from standard input. │
│ [required] │
╰──────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────────────╮
│ --base <str> The base IRI to │
│ use. │
│ --extract-all-scri… --no-extract-all-… Extract all JSON-LD │
│ script elements │
│ from HTML, or just │
│ the first. │
│ --produce-generali… --no-produce-gene… Permit generalized │
│ RDF output. │
│ --rdf-direction <i18n-datatype|com How to encode base │
│ pound-literal> direction in RDF. │
│ --help Show this message │
│ and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────╯
Usage: pyld to-rdf [OPTIONS] {INPUT}
Convert a JSON-LD document to N-Quads.
╭─ Arguments ──────────────────────────────────────────────────────────────────────────╮
│ * INPUT <str> Path or HTTP(S) URL. Pass - to read from standard input. │
│ [required] │
╰──────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────────────╮
│ --base <str> The base IRI to │
│ use. │
│ --extract-all-scri… --no-extract-all-… Extract all JSON-LD │
│ script elements │
│ from HTML, or just │
│ the first. │
│ --produce-generali… --no-produce-gene… Permit generalized │
│ RDF output. │
│ --rdf-direction <i18n-datatype|com How to encode base │
│ pound-literal> direction in RDF. │
│ --help Show this message │
│ and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────╯
Example¶
pyld to-rdf docs/examples/data/person.jsonld_:b0 <http://schema.org/name> "Ada Lovelace" .
Source person.jsonld