Quill_projectSourceNotebook project model.
A project is a collection of notebooks, optionally organized by a config file. Without a config file, any directory of .md files is a valid project.
A notebook reference. path is relative to the project root. Empty for placeholders.
Project configuration.
type t = {title : string;Project title.
*)root : string;Absolute path to the project directory.
*)toc : toc_item list;Table of contents.
*)config : config;Configuration.
*)}A project.
parse_config s parses a quill.conf file. Returns the configuration and table of contents entries.
Format: key = value lines for metadata, [Section Name] for groups, Title = path for notebooks (indentation creates nesting), --- for separators, # for comments.
title_of_filename "01-intro.md" is "Intro". Strips the extension, strips leading digits and separators, replaces dashes and underscores with spaces, and capitalizes the first letter.
notebooks t is the flat, ordered list of all notebooks in t, excluding placeholders.
all_notebooks toc flattens toc into an ordered list of all notebooks, including placeholders.
is_placeholder nb is true iff nb has no file (empty path).
prev_notebook t nb is the notebook before nb, or None.
next_notebook t nb is the notebook after nb, or None.
number toc nb is the section number of nb in toc, derived from its position. E.g. [1; 2] for the second entry in the first group. Returns [] if nb is not found.
number_string [1; 2] is "1.2". Returns "" for [].