DMOS - Djot Much Output Schnutification
DMOS is a thin layer over the jotdown Djot parser and renderer. It adds the following features:
- Syntax highlighting
- By default based on syntect
- inkjet/tree-sitter availabe, (executable size will be huge, see their README)
- Table of contents generation with various options
- Adding section anchors to headings linking to themselves
The anchors are a common technique to allow users to easily get the link to a specific section. They are usually styled with CSS to only appear when hovering over the heading. If you are viewing the HTML rendering of this document on sr.ht you can see a similar mechanism in action by hovering the mouse over any section heading.
The dmos crate is a library, dmos-cli is a thin CLI wrapper around it.
Usage
Usage: dmos [OPTIONS] [FILE]
Arguments:
[FILE] Read input from FILE instead of stdin
Options:
-a, --anchor Add anchors with text ANCHOR to headings
-t, --title-only Output first first-level heading and exit
--toc Generate document with table of contents
-T, --toc-only Output table of contents and exit
--toc-skip-title Skip title (first heading) in table of contents
--toc-prologue Prologue to the table of content listing [default: "Table of Contents"]
--toc-epilogue Epilogue to the table of content listing [default: ]
-h, --help Print help
-V, --version Print version
Contact
Feel free to send questions, patches, or other feedback to my public inbox. Inquiries about my mental well-being are justified, but please keep them polite.