Skip to content

pyld to-rdf

pyld to-rdf --help
 Usage: pyld to-rdf [OPTIONS] [INPUT_]                                          

 Convert a *-LD document → RDF.                                                

╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│   input_      [INPUT_]  Path or URL. Omit to read from standard input.       │
│                         [default: None]                                      │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --output-format                               [nquads]  Format to output the │
│                                                         data at.             │
│                                                         [default: nquads]    │
│ --base                                        TEXT      Base URL.            │
│                                                         [default: None]      │
│ --extract-all-scrip…    --no-extract-all-…              Extract all          │
│                                                         documents in YAML    │
│                                                         stream, or all       │
│                                                         scripts embedded in  │
│                                                         HTML.                │
│                                                         [default:            │
│                                                         extract-all-scripts] │
│ --help                                                  Show this message    │
│                                                         and exit.            │
╰──────────────────────────────────────────────────────────────────────────────╯

Example

pyld to-rdf docs/examples/pythagorean-theorem.yamlld
<https://dbpedia.org/page/Pythagorean_theorem> 
<http://www.w3.org/ns/prov#Entity> _:b0 .
_:b0 <https://math.namespace/equal> _:b1 .
_:b0 <https://math.namespace/equal> _:b4 .
_:b1 <https://math.namespace/add> _:b2 .
_:b1 <https://math.namespace/add> _:b3 .
_:b2 <https://math.namespace/squared> "variable:a" .
_:b3 <https://math.namespace/squared> "variable:b" .
_:b4 <https://math.namespace/squared> "variable:c" .