Help¶
Screencast (Asciinema)¶
Global Help¶
Invoking the CLI without any arguments, or with help
or --help
shows the global help:
$ ./enola
Missing required subcommand
Usage: enola [-hVv] COMMAND
https://enola.dev
-h, --help Show this help message and exit.
-v, --verbose Error verbosity; specify multiple -v options to increase it;
e.g. -v -v -v or -vvv.
-V, --version Print version information and exit.
Commands:
help Display help information about the specified command.
generate-completion Generate bash/zsh completion script for enola.
gen Generates output from Things
docgen Generate Markdown Documentation
get Get Thing
rosetta Transform YAML <=> JSON <=> TextProto <=> PB <=> RDF TTL
<=> JSON-LD etc.
server Start HTTP and/or gRPC Server/s
execmd Execute Commands in Markdown
info Provides various information
validate Validate Models (and exit)
canonicalize Canonicalize (AKA normalize) resources
Each sub-command’s help can be shown either with enola help SUBCOMMAND
(better) or enola SUBCOMMAND --help
(not recommended).
DocGen¶
Documentation Generation has the following options:
$ ./enola help docgen
Usage: enola docgen [-iv] [--[no-]classpath-scheme] [--[no-]file-loader] [--
[no-]file-scheme] [--[no-]http-scheme] [--[no-]tika-loader]
[--[no-]validate] [-d=<diagram>] [-h=<headerURI>]
[-var=<variables>] (-l=<load> [-l=<load>]... | -s=<server>)
[[-o=<output>]]
Generate Markdown Documentation
--[no-]classpath-scheme
Whether classpath:/ resource scheme to access
internal JAR content is allowed
Default: true
-d, --diagram=<diagram> Type of diagrams to generate (Mermaid, Graphviz,
None; default: Mermaid)
--[no-]file-loader Whether file:/ resources create File (or
Directory) Things
Default: true
--[no-]file-scheme Whether file:/ resource scheme to access local
filesystem is allowed
Default: true
-h, --header=<headerURI> URI of Markdown header (e.g. file: or string:
<URL-encoded> etc.)
Default: string:%23%20Models%0A
--[no-]http-scheme Whether external HTTP requests are allowed
Default: false
-i, --[no-]index Whether index.md should be generated
-l, --load=<load> URI Glob of Models to load (e.g. file:"**.ttl")
-o, --output=<output> URI (base) of where to write output/s; e.g. file:
/tmp or fd:1?charset=UTF-8
Default: fd:1?charset=UTF-8
-s, --server=<server> Target of an Enola gRPC Server (e.g. localhost:
7070)
--[no-]tika-loader Whether resources are loaded with Tika parsers to
create Things
Default: true
-v, --verbose Error verbosity; specify multiple -v options to
increase it; e.g. -v -v -v or -vvv.
--[no-]validate Whether validation errors in loaded models should
stop & exit
Default: false
-var, --variables=<variables>
Type of variables to generate for IRI Templates
(Mustache, HTML, Star; default: Mustache)
Get¶
Get Entity has the following options:
$ ./enola help get
Usage: enola get [-v] [--[no-]classpath-scheme] [--[no-]file-loader] [--[no-]
file-scheme] [--[no-]http-scheme] [--[no-]tika-loader] [--[no-]
validate] [-f=<format>] (-l=<load> [-l=<load>]... |
-s=<server>) [[-o=<output>]] iri
Get Thing
iri IRI of Thing
--[no-]classpath-scheme
Whether classpath:/ resource scheme to access
internal JAR content is allowed
Default: true
-f, --format=<format> Output Format: Turtle, JSONLD, Graphviz, TextProto,
ProtoYAML, ProtoJSON, BinaryPB; default=Turtle
--[no-]file-loader Whether file:/ resources create File (or Directory)
Things
Default: true
--[no-]file-scheme Whether file:/ resource scheme to access local
filesystem is allowed
Default: true
--[no-]http-scheme Whether external HTTP requests are allowed
Default: false
-l, --load=<load> URI Glob of Models to load (e.g. file:"**.ttl")
-o, --output=<output> URI (base) of where to write output/s; e.g. file:
/tmp or fd:1?charset=UTF-8
Default: fd:1?charset=UTF-8
-s, --server=<server> Target of an Enola gRPC Server (e.g. localhost:7070)
--[no-]tika-loader Whether resources are loaded with Tika parsers to
create Things
Default: true
-v, --verbose Error verbosity; specify multiple -v options to
increase it; e.g. -v -v -v or -vvv.
--[no-]validate Whether validation errors in loaded models should
stop & exit
Default: false
Server¶
The built-in HTTP Web Server has the following options:
$ ./enola help server
Usage: enola server [-v] [--[no-]classpath-scheme] [--[no-]file-loader] [--[no-]
file-scheme] [--[no-]http-scheme] [--[no-]tika-loader] [--
[no-]validate] (-l=<load> [-l=<load>]... | -s=<server>)
([--httpPort=<httpPort>] [--grpcPort=<grpcPort>])
Start HTTP and/or gRPC Server/s
--[no-]classpath-scheme
Whether classpath:/ resource scheme to access
internal JAR content is allowed
Default: true
--[no-]file-loader Whether file:/ resources create File (or Directory)
Things
Default: true
--[no-]file-scheme Whether file:/ resource scheme to access local
filesystem is allowed
Default: true
--grpcPort=<grpcPort>
gRPC API Port
--[no-]http-scheme Whether external HTTP requests are allowed
Default: false
--httpPort=<httpPort>
HTTP Port
-l, --load=<load> URI Glob of Models to load (e.g. file:"**.ttl")
-s, --server=<server> Target of an Enola gRPC Server (e.g. localhost:7070)
--[no-]tika-loader Whether resources are loaded with Tika parsers to
create Things
Default: true
-v, --verbose Error verbosity; specify multiple -v options to
increase it; e.g. -v -v -v or -vvv.
--[no-]validate Whether validation errors in loaded models should
stop & exit
Default: false
ExecMD¶
Executable Markdown has the following options:
$ ./enola help execmd
Usage: enola execmd [-iv] <files>...
Execute Commands in Markdown
<files>... URI/s (incl. Globs) of Markdown (MD) files to process
-i, --in-place Edit MD files in place
-v, --verbose Error verbosity; specify multiple -v options to increase it;
e.g. -v -v -v or -vvv.
Rosetta¶
Rosetta has the following options:
$ ./enola help rosetta
Usage: enola rosetta [-v] [--[no-]classpath-scheme] [--[no-]file-loader] [--
[no-]file-scheme] [--[no-]http-scheme] [--[no-]
tika-loader] --in=<in> -o=<out> [--protoFQN=<protoFQN>]
Transform YAML <=> JSON <=> TextProto <=> PB <=> RDF TTL <=> JSON-LD etc.
(see https://en.wikipedia.org/wiki/Rosetta_Stone)
--[no-]classpath-scheme
Whether classpath:/ resource scheme to access
internal JAR content is allowed
Default: true
--[no-]file-loader Whether file:/ resources create File (or Directory)
Things
Default: true
--[no-]file-scheme Whether file:/ resource scheme to access local
filesystem is allowed
Default: true
--[no-]http-scheme Whether external HTTP requests are allowed
Default: false
--in=<in> URI to Input (e.g. file:model.json)
-o, --out, --output=<out>
URI to Output (e.g. file:model.yaml)
--protoFQN=<protoFQN>
Proto FQN; optional for YAML <=> JSON, required if
--in is *.textproto
--[no-]tika-loader Whether resources are loaded with Tika parsers to
create Things
Default: true
-v, --verbose Error verbosity; specify multiple -v options to
increase it; e.g. -v -v -v or -vvv.
Canonicalize¶
Canonicalize has the following options:
$ ./enola help canonicalize
Usage: enola canonicalize [-v] [--[no-]classpath-scheme] [--[no-]file-scheme]
[--[no-]http-scheme] [--[no-]pretty] -l=<load>
[-l=<load>]... [[-o=<output>]]
Canonicalize (AKA normalize) resources
using e.g. RFC 8785 JSON Canonicalization Scheme (JCS) inspired approach
(but this implementation is currently not yet fully compliant with that RFC)
--[no-]classpath-scheme
Whether classpath:/ resource scheme to access
internal JAR content is allowed
Default: true
--[no-]file-scheme Whether file:/ resource scheme to access local
filesystem is allowed
Default: true
--[no-]http-scheme Whether external HTTP requests are allowed
Default: false
-l, --load=<load> URI Glob of Models to load (e.g. file:"**.ttl")
-o, --output=<output> URI (base) of where to write output/s; e.g. file:
/tmp or fd:1?charset=UTF-8
Default: fd:1?charset=UTF-8
--[no-]pretty Whether to 'pretty print' (format) output
Default: false
-v, --verbose Error verbosity; specify multiple -v options to
increase it; e.g. -v -v -v or -vvv.
Validate¶
$ ./enola help validate
Usage: enola validate [-v] [--[no-]classpath-scheme] [--[no-]file-loader] [--
[no-]file-scheme] [--[no-]http-scheme] [--[no-]
tika-loader] [--[no-]validate] (-l=<load> [-l=<load>]...
| -s=<server>)
Validate Models (and exit)
--[no-]classpath-scheme
Whether classpath:/ resource scheme to access
internal JAR content is allowed
Default: true
--[no-]file-loader Whether file:/ resources create File (or Directory)
Things
Default: true
--[no-]file-scheme Whether file:/ resource scheme to access local
filesystem is allowed
Default: true
--[no-]http-scheme Whether external HTTP requests are allowed
Default: false
-l, --load=<load> URI Glob of Models to load (e.g. file:"**.ttl")
-s, --server=<server> Target of an Enola gRPC Server (e.g. localhost:7070)
--[no-]tika-loader Whether resources are loaded with Tika parsers to
create Things
Default: true
-v, --verbose Error verbosity; specify multiple -v options to
increase it; e.g. -v -v -v or -vvv.
--[no-]validate Whether validation errors in loaded models should
stop & exit
Default: false
Info¶
Info has the following options:
$ ./enola help info
Usage: enola info [-v] [COMMAND]
Provides various information
-v, --verbose Error verbosity; specify multiple -v options to increase it;
e.g. -v -v -v or -vvv.
Commands:
extensions Provides information about extensions of media types for URI path
resource names
mediatypes Provides information about all supported media types for Thing
Resource I/O
detect Provides information about the media type detected for a given
URL.
This works both for local files (based on extension), and remote
HTTP (based on headers).
metadata Provides metadata for a given IRI
Generate Completion¶
$ ./enola generate-completion --help
Usage: enola generate-completion [-hVv]
Generate bash/zsh completion script for enola.
Run the following command to give `enola` TAB completion in the current shell:
source <(enola generate-completion)
Options:
-h, --help Show this help message and exit.
-v, --verbose Error verbosity; specify multiple -v options to increase it;
e.g. -v -v -v or -vvv.
-V, --version Print version information and exit.