Skip to content

pyld expand

pyld expand --help
 Usage: pyld expand [OPTIONS] [INPUT_]                                          

 Expand a *-LD document.                                                       

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

Example

pyld expand docs/examples/pythagorean-theorem.yamlld --output-format yaml
- '@id': https://dbpedia.org/page/Pythagorean_theorem
  http://www.w3.org/ns/prov#Entity:
  - https://math.namespace/equal:
    - https://math.namespace/add:
      - https://math.namespace/squared:
        - '@value': variable:a
      - https://math.namespace/squared:
        - '@value': variable:b
    - https://math.namespace/squared:
      - '@value': variable:c