#html #syntax #minimalist #convert #command #github #min-ty-ml

app mintyml-cli

Creates HTML from MinTyML, a minialist alternative syntax to HTML

12 releases

new 0.1.17 May 23, 2024
0.1.16 May 22, 2024
0.1.11 Apr 29, 2024

#21 in #minimalist

Download history 174/week @ 2024-04-05 157/week @ 2024-04-12 345/week @ 2024-04-19 611/week @ 2024-04-26 52/week @ 2024-05-03 148/week @ 2024-05-10 43/week @ 2024-05-17

908 downloads per month

MIT license

200KB
5.5K SLoC

Installation

Download the binary from Github or install with cargo install mintyml-cli

Help Text

Processes MinTyML, a minimalist alternative syntax for HTML.

For more information, see https://youngspe.github.io/mintyml and https://github.com/youngspe/mintyml

Usage: mintyml-cli <COMMAND>

Commands:
  convert  Convert MinTyML to HTML
  help     Print this message or the help of the given subcommand(s)

Options:
  -h, --help
          Print help (see a summary with '-h')

convert Command

Convert MinTyML to HTML

Usage: mintyml-cli convert [OPTIONS] <--stdin|--dir <SRC_DIR>|SRC_FILES>

Options:
  -h, --help
          Print help (see a summary with '-h')

Input Source:
      --stdin
          Read MinTyML source from stdin

  -d, --dir <SRC_DIR>
          Search for MinTyML files in the given directory

  -r, --recurse [<DEPTH>]
          Whether to recursively search subdirectories when searching a directory for source files.
          If specified, the search will be limited to `DEPTH` levels of nested subdirectories

  [SRC_FILES]...
          Convert the specified MinTyML file(s)

Output Destination:
  -o, --out <OUT>
          Write the converted HTML to the given filename or directory

      --stdout
          Write the converted HTML to stdout

Output Options:
  -x, --xml
          Produce XHTML5 instead of HTML

  -p, --pretty
          Produce HTML with line breaks and indentation for readability

      --indent <INDENT>
          Number of spaces for each indentation level when `--pretty` is enabled
          
          [default: 2]

      --complete-page[=<ENABLE>]
          Make a complete HTML page by wrapping the contents in `<html>` tags.
          
          * If the source document already has an `html` element at the top level, no changes will
          be made.
          
          * If the source document has a `body` element at the top level, no changes will be made
          beyond wrapping the document in `<html>` tags.
          
          * Otherwise, a `head` element will be created containing all top-level elements that
          belong in `head` (e.g. `title`, `meta`, `style`), and a `body` element will be created
          containing all other top-level elements.
          
          [default: true]
          
          [possible values: true, false]

      --fragment
          Convert a MinTyML fragment without wrapping it in `<html>` tags. Equivalent to
          `--complete-page=false`

      --special-tag <SPECIAL_TAG>
          Override the element types used when converting special tags.
          
          This argument may be used multiple times to allow multiple overrides. Additionally,
          multiple overrides can be specified per argument, separated by commas.
          
          Example: --special_tag underline=ins,strike=del

          Possible values:
          - strong=...:               <# strong #> (default: 'strong')
          - emphasis=...:             </ emphasis /> (default: 'em')
          - underline=...:            <_ underline _> (default: 'u')
          - strike=...:               <~ strike ~> (default: 's')
          - quote=...:                <" quote "> (default: 'q')
          - code=...:                 <` code `> (default: 'code')
          - code-block-container=...: ``` code block ``` (default: 'pre')

      --metadata[=<ENABLE>]
          EXPERIMENTAL: If enabled, parsing metadata will be added to the output.
          
          See https://github.com/youngspe/mintyml/blob/main/documentation/general/metadata.md for
          more information.
          
          [possible values: true, false]

      --metadata-elements[=<ENABLE>]
          EXPERIMENTAL: Generate elements for nodes that don't correspond directly to HTML elements,
          like comments and text segments. Implies `--metadata`
          
          [possible values: true, false]

Dependencies

~4–16MB
~185K SLoC