tvbo import
Load a foreign file into a TVBO object via the registry’s importer dispatch.
Synopsis
tvbo import PATH
[--format KEY]
[--output, -o PATH]
Flags
| Flag | Default | Purpose |
|---|---|---|
PATH |
(required) | Input file. Must exist and be readable. |
--format |
(inferred from extension) | Force a specific format key. |
--output, -o |
(none) | If given, save the loaded object as YAML to this path. |
Behaviour
- Resolves the format either from
--formator by file extension (.yaml→yaml,.jsonld→openminds, …). - If the format has no registered importer, errors out with
Format 'X' has no importer. - Calls
tvbo.export.load(format_key, path)to produce a Python object. - If
--outputis given and the object exposes.save(), writes it as YAML to--output.
Which formats can be imported?
tvbo formatsThe importer column shows yes for every format that supports import. Today this includes yaml, openminds, and a small number of standards adapters; more will be added as importers land for SED-ML, OMEX, and BIDS.
Examples
# Load a YAML experiment (extension inferred)
tvbo import ./study.yaml
# Force the openMINDS importer regardless of extension
tvbo import ./bundle.jsonld --format openminds
# Convert openMINDS → TVBO YAML in one step
tvbo import ./bundle.jsonld --format openminds -o ./study.yamlSee also
tvbo export— inverse directiontvbo formats— see which formats are importable