A markup previewer
MUP is a markup previewer. It supports multiple markup formats. You can use it
to read markup text, but it is also useful when writing markup text to check
how your work looks, thanks to its refresh-as-you-save feature.
MUP supports Markdown and reStructuredText using Python modules.
It also supports the following formats using external converters:
External converters are command line tools which are invoked by MUP to convert
input files. To be used as an external converter, the tool must accept markup
on stdin and produce HTML on stdout.
Start MUP like this:
mup markup_file
To read a man page with mup:
mupman ls
Or:
mupman 5 crontab
MUP requires Python 3 and the following Python modules:
It can make use of other Python modules and external tools to render various
markup formats.
For Markdown you need to install one of these:
For GitHub Flavored Markdown (Markdown which takes newlines into account) you
need to install one of these:
For reStructuredText you need to install the docutils Python module.
For man pages you need to install Groff (but it is already installed on
most Linux distributions).
For Ronn you need to install Ronn.
For Asciidoc you need to install Asciidoc.
For Mediawiki you need to install Pandoc.
Run ./setup.py install
as root.
You can edit the current file by clicking on the menu button then select “Open
with Editor”. This will open the file in the configured editor.
To configure which editor should be used, edit ~/.config/mup/mup.yaml
and add
the following content:
editor: name-of-your-editor
Note: for now you cannot define arguments for the editor. If you need arguments
you will have to write a wrapper shell script.
To declare the foo2html
command as a converter for .foo or .foobar files,
create a foo.yaml
file in /usr/share/mup/converters
or in~/.local/share/mup/converters
with the following content:
name: Foo
cmd: foo2html
matches: ["*.foo", "*.foobar"]
If MUP can find the foo2html
binary, it will use it whenever it tries to open
a .foo file.
Other optional keys:
args
: Arguments to pass to the commandfull
: Set to true if the command creates a complete HTML document, not justonline
: Set to true if the converter uses an online service. Those arereference
: Set to true if the converter is the reference implementation forMUP is managed using the lightweight project management policy.
Get the code from https://github.com/agateau/mup
then file pull requests
against the dev
branch.
Aurélien Gâteau
BSD