Expand description
The parts of the docs written from the code, and the one place that writes them.
Each Generated is a whole page or a marked region of one. gen_docs write
writes them all; the_generated_docs_are_current fails while a committed copy
differs. The renderers are plain functions over the registries (options, settings,
environment, formats, keys), so a manpage can render the same sources as roff.
A region sits between two comments, which mdBook and GitHub hide:
<!-- generated: NAME -->
...
<!-- end generated: NAME -->In a Jinja template the comments are {# generated: NAME #}, and in TOML, Ruby
and desktop files # generated: NAME, so they stay out of what the file renders.
Structs§
- Generated
- A page, or a region of one, written from the code.
Constants§
- GENERATED
- Every generated part of the docs.
Functions§
- doc_
title - A format’s name in the docs: its title, or the containers for audio.
- format_
count_ sentence - “datui reads 27 formats: Parquet, CSV, … and binary formats you describe in a format spec.” Counted from the descriptors, so the number cannot go stale.
- format_
page - The family page and heading that describe a format, from
docs/formats/. - read_
file - A repository file’s text, by its path from the root, line endings as LF.
- render_
all - What each generated file should hold: the file and its text, every region filled. The manpages are whole files, after the docs.
- render_
formats_ markdown - The formats overview’s table: how a file of each format is read, from its descriptor. One row per format, then an Arrow IPC stream and a format spec.
- render_
public_ catalog - The bundled catalog for the docs: its header comment as a quote, the rest as a block. A block’s comment lines read as headings in some outlines, so the header’s rules are prose here.
- render_
python_ options_ markdown - The keywords
datui.view()andDatuiOptionstake, from the option registry: the open’s own options, then the config keys’, thenconfig. - repo_
root - The repository’s root, from this crate’s manifest directory.
- short_
title - A format’s name in a list of them: its title, or a plain name for audio and text.
- splice
text, the contents offile, with regionnamereplaced bycontent. An error when the region’s markers are missing.- write_
all - Write every generated part. Returns the files that changed.