All Projects → agateau → mup

agateau / mup

Licence: other
A markup previewer

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to mup

Atom Asciidoc Preview
⚛ AsciiDoc preview for the Atom editor.
Stars: ✭ 136 (+257.89%)
Mutual labels:  asciidoc, preview
rstpad
Standalone reStructuredText editor with live preview (native app)
Stars: ✭ 35 (-7.89%)
Mutual labels:  preview, rst
vscode-tldr
Provides tldr hover information for common commands in bash/dockerfiles/powershell files.
Stars: ✭ 44 (+15.79%)
Mutual labels:  man
sphinx-jekyll-builder
sphinx builder that outputs jekyll compatible markdown files with frontmatter
Stars: ✭ 18 (-52.63%)
Mutual labels:  rst
asciidoctor-katex
Asciidoctor extension for converting latexmath using KaTeX at build time
Stars: ✭ 16 (-57.89%)
Mutual labels:  asciidoc
link-verifier
A tool for verifying links in text-based files
Stars: ✭ 26 (-31.58%)
Mutual labels:  asciidoc
react-hover-video-player
A React component for rendering videos that play on hover, including support for mouse and touch events and a simple API for adding thumbnails and loading states.
Stars: ✭ 60 (+57.89%)
Mutual labels:  preview
awesome-switcher
Switch clients in Awesome WM with the familiar preview functionality
Stars: ✭ 86 (+126.32%)
Mutual labels:  preview
react-file-input-previews-base64
This package provides an easy to use, ready to go and customizable wrapper around file input, with option for image previews and returning file as base64 string.
Stars: ✭ 15 (-60.53%)
Mutual labels:  preview
pdf annotation fix
Fixes macOS Preview garbled annotations
Stars: ✭ 71 (+86.84%)
Mutual labels:  preview
asciidoctor-htmlbook
Asciidoctor HTMLBook is an Asciidoctor backend for converting AsciiDoc documents to HTMLBook documents.
Stars: ✭ 31 (-18.42%)
Mutual labels:  asciidoc
previewjs
Preview UI components in your IDE instantly
Stars: ✭ 1,331 (+3402.63%)
Mutual labels:  preview
hexo-renderer-asciidoc
Asciidoc renderer plugin for Hexo
Stars: ✭ 16 (-57.89%)
Mutual labels:  asciidoc
video-snapshot
Get snapshots from a video file in the browser 🎥 🌅
Stars: ✭ 63 (+65.79%)
Mutual labels:  preview
manpm
Shows the relevant part of NPM module's README file right in your terminal
Stars: ✭ 40 (+5.26%)
Mutual labels:  man
vue-active-preview
🌲 A PhotoSwipe Image Preview component for Vue
Stars: ✭ 22 (-42.11%)
Mutual labels:  preview
blur-up
A tool that creates preview images.
Stars: ✭ 28 (-26.32%)
Mutual labels:  preview
octoview
The missing preview feature for GitHub
Stars: ✭ 52 (+36.84%)
Mutual labels:  preview
ngx-dropzone
A highly configurable dropzone component for Angular.
Stars: ✭ 123 (+223.68%)
Mutual labels:  preview
vscode-svg-preview
Svg Preview for VSCode
Stars: ✭ 27 (-28.95%)
Mutual labels:  preview

MUP: 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 in action

Features

  • Supports multiple markup formats, easy to extend
  • Automatically refreshes itself when the document is modified, tries to retain the position in the document after refreshing
  • Skips metadata headers, such as those used by static blog generators like Jekyll
  • Supports gzipped documents, useful to read documentation shipped with Debian packages
  • Comes with a wrapper for man pages

Supported Formats

MUP supports Markdown and reStructuredText using Python modules.

It also supports the following formats using external converters:

  • Markdown
  • GitHub Flavored Markdown
  • Ronn
  • Man pages
  • Asciidoc
  • Mediawiki

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.

Usage

Start MUP like this:

mup markup_file

To read a man page with mup:

mupman ls

Or:

mupman 5 crontab

Requirements

MUP requires Python 3 and the following Python modules:

  • PyQt5, including PyQt5 WebKit, which can be in a separate package
  • PyYAML
  • PyXDG

It can make use of other Python modules and external tools to render various markup formats.

Markdown

For Markdown you need to install one of these:

GitHub Flavored Markdown (GFM)

For GitHub Flavored Markdown (Markdown which takes newlines into account) you need to install one of these:

  • kramdown
  • Python Requests module: to render GFM using GitHub Rest API (slow but accurate)

reStructuredText

For reStructuredText you need to install the docutils Python module.

Man pages

For man pages you need to install Groff (but it is already installed on most Linux distributions).

Ronn

For Ronn you need to install Ronn.

Asciidoc

For Asciidoc you need to install Asciidoc.

Mediawiki

For Mediawiki you need to install Pandoc.

Installation

Run ./setup.py install as root.

Editing files

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.

Defining a new Converter

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 command
  • full: Set to true if the command creates a complete HTML document, not just an HTML snippet (defaults to false)
  • online: Set to true if the converter uses an online service. Those are slower than offline ones and are thus not selected by default
  • reference: Set to true if the converter is the reference implementation for the format it handles. A reference converter will be selected by default if available

Contributing

MUP 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.

Author

Aurélien Gâteau

License

BSD

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].