package quill
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=96d35ce03dfbebd2313657273e24c2e2d20f9e6c7825b8518b69bd1d6ed5870f
sha512=90c5053731d4108f37c19430e45456063e872b04b8a1bbad064c356e1b18e69222de8bfcf4ec14757e71f18164ec6e4630ba770dbcb1291665de5418827d1465
doc/quill.project/Quill_project/index.html
Module Quill_projectSource
Notebook 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.
Types
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.
Configuration
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.
Titles
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.
Queries
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 [].