dmos 0.2.1

Djot HTML renderer with advanced features
Documentation

DMOS - Djot Much Output Schnutification

DMOS is a thin layer over the jotdown Djot parser and renderer. It adds the following features:

  • Syntax highlighting
  • 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 <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 <HTML>  Prologue to the table of content listing [default: "<section class=\"toc\"><h3>Table of Contents</h3>"]
      --toc-epilogue <HTML>  Epilogue to the table of content listing [default: </section>]
  -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.