modulefdoc_project_file
Reading settings from a project file, fpm.toml or a TOML string.
A project file starts with Markdown metadata, optionally between --- lines: key: value lines,
with values continued on lines indented by four or more blanks. Metadata ends at the first blank
line, at an end marker, or at a line that fits neither form. The rest of the file is the text of
the front page. An [extra.ford] table in fpm.toml next to the project file replaces its
metadata, as in FORD; the text of the project file is then used whole. An [extra.fdoc] table does
the same and comes first, and can give the front page: its text in front_page, or the Markdown
file that holds it in front_page_file, relative to fpm.toml.
Uses
- tomlf
- tomlf_constants
- ffmt_fs
- ffmt_strings
- fdoc_util
- fdoc_settings
- fdoc_progress
Graphs
Uses
Used by
Types
meta_item_tprivate
A metadata key and the values given for it.
metadata_t
The metadata of a project file and what follows it.
Functions
is_markerpureprivate
True if line is three of c, alone or followed by whitespace and anything else.
leading_blankspureprivate
Number of blanks at the start of line.
match_keyprivate
True if line is key: value, indented by at most three blanks.
scalar_textprivate
A string, integer or logical value of table as text.
Subroutines
add_valueprivate
Add a value for key, whose position in meta%items is returned in current.
apply_tableprivate
Apply the keys of TOML table as options.
apply_toml_string
Apply --config options: TOML with ; between lines.
array_valuesprivate
The items of a TOML array as text. An array of tables is taken to be extra_filetypes.
load_fpm_settingsprivate
Read the [extra.fdoc] or [extra.ford] table of fpm.toml file path, if there is one.
load_project
Read the settings and front page text of the project. Settings come from an [extra.fdoc] or
[extra.ford] table in fpm.toml if there is one, and otherwise from the metadata of the project
file. With no path the project file is ford.md, if it exists: [extra.fdoc] does not need one,
as the text of the front page can be in its front_page, or the file named by front_page_file.
map_valuesprivate
The string entries of table in the form key<sep>value.
parse_metadata
Split project file text into metadata and body.