On 09/24/2018 04:47 PM, Cameron Simpson wrote:
On 24Sep2018 12:32, Patrick O'Callaghan <pocallag...@gmail.com> wrote:
I'm looking for a simple terminal-based viewer for Markdown files. I
*don't* want an editor. Think 'less', not 'emacs'. I don't mind if it
wants to pop up a window to show rich text, but it's not critical.

It seems remarkably* difficult to find such a beast.

I've been using mdv. For example, to check my Python module docstrings (which I do in Markdown) before release:

 distinfo cs.lex long_description|mdv -

"distinfo" is an alias associated with my release scripts, but the important thing here is that it empts the Markdown to stdout into "mkv".

Views nicely in a terminal.

Cheers,
Cameron Simpson <c...@cskk.id.au>

I found this at https://unix.stackexchange.com/questions/4140/markdown-viewer


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
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org

Reply via email to