Skip to main content

Crate datui_cli

Crate datui_cli 

Source
Expand description

Shared CLI definitions for datui.

Used by the main application and by the gen_docs binary, which writes the generated docs and the manpages from these definitions.

Modules§

docgen
The parts of the docs written from the code, and the one place that writes them.
exit
The exit statuses datui ends with: the binary returns these, and every manpage’s EXIT STATUS section is rendered from STATUSES.
keys
The key registry: every key of every screen, in one table.
man
The manpages, rendered from the sources the docs render from: the clap definitions, the option, environment and key registries, the format descriptors, examples.toml and the query and format-spec references.
settings
The option registry: every config key in one table, with its type, default, the line that documents it, and the flag that sets it for one run, if one does.
units
Sizes and durations written with their unit: 512MiB, 250ms. One parser reads them from a config file, from -c and from a flag, so a value means the same wherever it is written.

Structs§

Args
Command-line arguments for datui.
Conversion
What the open says while a file is read into files of its own.
Descriptor
What datui knows of a format without reading a file of it.
Example
One entry of EXAMPLES_TOML: a command and what it does.
ExampleFile
A file an Example reads: its name and its text.
Tables
The tables in a file of a format.

Enums§

CacheAction
What datui cache does.
CatalogAction
What datui catalog does.
Command
Commands besides opening data.
Compressed
How a compressed file of a format is read.
CompressionFormat
Compression format for data files
ConfigAction
What datui config does.
ExampleTest
How the doc-example runner runs an Example.
FileFormat
A format datui reads, as --format names it.
FormatChoice
What --format names: a format datui reads, a format spec on the search path, or a spec’s file.
FormatsAction
What datui formats does besides listing.
InferTypes
What --infer-types asks for.
Lines
How a line of a line-oriented text format is read.
ReadMode
How an open reads a file. See FileFormat::read_mode.
RemoteRead
How a remote object is read.
Stored
How a file sits on disk, where that changes how it is read.
Summary
What the Info panel shows of a file of a format besides its Schema tab.
ThemeAction
What datui theme does.
ViewsAction
What datui views does.

Constants§

COMPLETION_FILES
Each shell’s completion script and the file name its shell loads it by: what a package or the release archive installs.
EXAMPLES_TOML
The examples: --help shows them, and the manpage, the command-line reference and the README render them. One file, so they cannot differ; each runs as written, and scripts/docs/doc_examples.py runs them.
LOG_LEVELS
The levels --log-level and DATUI_LOG take.
NUMBER_FORMAT_VALUES
Accepted values for --number-format.

Functions§

check_comment_char
Why c cannot mark comment lines, if it cannot: it must be something, and on one line. --comment, its config key and the Python option share it.
completions
The completion script for shell, built from Args, for datui completions.
examples
The entries of EXAMPLES_TOML, in order. Panics on a malformed entry, which every_example_parses_as_written and every --help reach first.
examples_help
The examples as --help shows them, after the options.
examples_of
The examples of manpage page (datui.1), in order.
format_help
--format’s help, listing every format by name.
one_table
Why --table was refused for a file of format (None: not known), which holds one table: the formats whose tables it picks. The reader names the file before it.
parse_delimiter
A delimiter as people write it: ;, tab, \t, or a byte code such as 0x1f.
render_options_markdown
docs/reference/command-line-options.md: the usage, every option grouped as --help groups it, the commands and the examples. Written by gen_docs; a test fails while the committed page differs.
table_help
--table’s help: what it takes for each format whose tables it picks.