utf8 markdown input -> ansi styled terminal output
 
 
Go to file
moss 12e96454ff improve args handling 2025-01-25 18:15:36 -06:00
md4c initial commit 2025-01-24 18:43:15 -06:00
src improve args handling 2025-01-25 18:15:36 -06:00
README.md add build instructions 2025-01-25 01:34:38 +00:00
build.zig remove some stuff left over from `zig init` 2025-01-24 18:48:25 -06:00
build.zig.zon initial commit 2025-01-24 18:43:15 -06:00

README.md

mdcat

mdcat is a tiny portable linux binary to render markdown from a file (or stdin) to styled ansi for the terminal.

usage examples:

mdcat README.md | less -R # -R is required for less to support ansi styling
printf '# header\n- list item 1\n- list item 2' | mdcat

features

mdcat isn't really a compliant markdown implementation - i made it to render a bit of styling in notes i write on the terminal. the following are currently supported:

  • bold with **text**
  • italic with *text*
  • underline with _text_
  • links with [label](destination)
  • headers with # text
  • lists with - list item or 1. list item (but numbered lists dont render as numbered yet)
  • task lists with - [x] list item or - [ ] list item where a checkbox is ticked if the x is present.
  • horizontal rules with *** which span the entire terminal width.
  • strikethrough with ~~text~~

dependencies

building

  1. install zig 0.13.0
  2. clone repo
  3. run zig build

if you want a release build:

  1. run zig build --release=small

release optimize modes are:

  • fast
  • safe
  • small

the mdcat binary will be in zig-out/bin/mdcat