-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
Description
We have two cases, where it would be desirable to forgo explicit enumeration of chapters:
- When we already use numbers/alphabetic order on the file system level
- When we don't care about the order of chapters at all
If pyyaml supports multiple tags, this syntax would be desirable
chapters: !glob !path chapters/**/*.md
// or when we care about order of chapters _surrounding_ some block of chapters
chapters:
- index.md
- !glob !path chapters/**/*.md
- last_chapter.md
If pyyaml does not support multiple tags, something like !glob_path would be nice, or even just accept glob syntax by default.
Temporary solutions
Currently we use this snippet to automatically add chapters to config
find src -type f -name "*.md" | sort --numeric-sort | sed "s/src\// - /" >> foliant.yml
Alternatively, one could use a snippet to form a different file completely automated, but
find src -type f -name "*.md" | sort --numeric-sort | sed "s/src\// - /" > chapters.yml