Markdown Viewer
Using pandoc and lynx without creating temporary files:
pandoc file.md | lynx -stdin
Note: credits to @Joe's answer in Stack Overflow.
You can use Grip, which renders the Markdown exactly as GitHub would (it uses the GitHub markdown API).
Install it with pip
:
pip install grip
To render a file example.md
:
grip -b example.md
How this looks like:
I wrote a lightweight terminal markdown viewer in python, for CLI or as lib:
- https://github.com/axiros/terminal_markdown_viewer
It supports e.g. tables, admonitions and tons of color themes.
Usage:
mdv [-t THEME] [-T C_THEME] [-x] [-l] [-L] [-c COLS] [-f FROM] [-m] [-M DIR] [-H] [-A] [MDFILE]
Options:
MDFILE : Path to markdown file
-t THEME : Key within the color ansi_table.json. 'random' accepted.
-T C_THEME: Theme for code highlight. If not set: Use THEME.
-l : Light background (not yet supported)
-L : Display links
-x : Do not try guess code lexer (guessing is a bit slow)
-f FROM : Display FROM given substring of the file.
-m : Monitor file for changes and redisplay FROM given substring
-M DIR : Monitor directory for markdown file changes
-c COLS : Fix columns to this (default: your terminal width)
-A : Strip all ansi (no colors then)
-H : Print html version