Command line¶
The kgm application exposes the package's manifest-management functions. Use -h at any level to see the available arguments and options.
Commands¶
validatevalidates a manifest and the resources it describes.labelfinds missing labels and can return IRIs, RDF, or an updated manifest.documentgenerates a resource table or catalogue content.loadloads manifest content into a file or SPARQL endpoint.syncsynchronises local resources with a SPARQL endpoint.eventprovides event-based synchronisation for advanced integrations.
For example:
kgm document table manifest.ttl
kgm load file manifest.ttl output.trig
kgm sync manifest.ttl https://example.com/sparql
Run kgm -h to list commands, which will be something like this:
Usage: kgm [OPTIONS] COMMAND [ARGS]...
KGM top-level Command Line Interface. Ask for help (-h) for each Command
╭─ Options ────────────────────────────────────────────────────────────────────────╮
│ --version -v │
│ --help -h Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────╮
│ validate Validate the structure and content of a KGM │
│ sync Synchronize a KGM's resources with loaded copies of them in │
│ a SPARQL Endpoint │
│ label Discover labels missing from data in a in a KGM and patch │
│ them │
│ document Create documentation from a KGM │
│ load Load a KGM's content into a file or DB │
│ event Event-based KGMs actions │
╰──────────────────────────────────────────────────────────────────────────────────╯
Add -h to a command or command group for detailed help, so for the sync command:
[!NOTE] If (when?) KGM runs into problems such as trying to synchronise resources between files and an RDF DB with missmatching version numbers, you can always run kurra commands to directly manage DB resources.
For example, you can run
kurra db gsp put {FILE} {SPARQL-ENDPOINT} -g {GRAPH-NAME}to force a replacement of the grapf,GRAPH-NAME, in the RDF DB with the contents of theFILE.