Mdviewer Save

Minimalistic Markdown viewer/converter with built-in Css stylesheets support.

Project README



mdviewer is a minimalistic GTK+ Markdown viewer/converter written in Haskell. It supports using Css stylesheets both from a built-in styles repository or from user provided Css files. It is also possible to export files to Html embedding the selected style into a single self-contained file.


At the time, mdviewer can be installed both compiling it from source using Stack, or downloading a precompiled binary provided by CircleCI


Compiling from source using Stack

git clone
cd mdviewer

stack setup
stack install gtk2hs-buildtools 
stack install

The installation will usually copy the executable to $HOME/.local/bin, so it is important that you have appended it to your PATH. Other data files such as the styles repository are copied into your Xdg data folder. This is usually $HOME/.local/share/mdviewer.

Downloading a precompiled binary

This process is automated by the bash script which downloads a precompiled binary from the latest CircleCI build, and the data files from this GitHub repository using Subversion. Make sure you have installed wget and svn before running the installer.

chmod +x

This method will copy the executable to $HOME/.local/bin and the data files to $HOME/.local/share/mdviewer.


mdviewer currently supports three subcommands:


mdviewer show [input] [-s STYLE]

This subcommand launches an interactive WebKit based window where you can use the supported key-bindings to open files, change styles, navigate following links and so on. If you run mdviewer show without specifying an input file, a welcome file is shown.

Interactive controls

The current key-bindings mapping intends to provide a vim-like user experience:

key description
e open file
w save as Html
r reload preview
n set next style
N set previous style
g go to page top
G go to page bottom
z go to previous page
x go to following page
q quit


mdviewer convert input [-o OUTPUT] [-s STYLE]

This subcommand converts a Markdown file into an Html file which optionally embeds an Css stylesheet. If no output file is specified, then the output is saved to input.html.


mdviewer list

This subcommand lists the Css stylesheets currently available at the styles repository; you can choose any of them by using the -s/--style flag followed by a style name when calling to show/convert subcommands. If you want to use an external Css stylesheet instead, just use the -s/--style flag providing the path to it and mdviewer will add it to the built-in styles repository for future usage automatically.

Available styles:
  * air
  * foghorn
  * ghostwriter
  * github
  * github-dark
  * godspeed
  * manuscript
  * markdown
  * ...


I would like to say thanks to some of the authors of the Css stylesheets built-in into mdviewer:

Please, if you find this software useful don't doubt to give any feedback. PRs are welcome!

Open Source Agenda is not affiliated with "Mdviewer" Project. README Source: agustinmista/mdviewer
Open Issues
Last Commit
5 years ago

Open Source Agenda Badge

Open Source Agenda Rating