Skip to content

Latest commit

 

History

History
100 lines (66 loc) · 2.52 KB

Readme.md

File metadata and controls

100 lines (66 loc) · 2.52 KB

mad(1)

mad(1) is a markdown driven manual page viewer, this makes manuals easier to write, reuse, and read.

For a newer / actively maintained thing check out tldr.

markdown man page

Usage

Usage: mad <file>

Options:

  -U, --update-self update mad(1) itself
  -u, --update      update remote mad-pages
  -v, --version     output cpm version
  -h, --help        output this help information
  -l, --list      list mad-pages

Installation

Install mad(1) and its associated mad page to $HOME/.local:

$ make install

Uninstall both mad(1) and the associated mad page:

$ make uninstall

About

I love man pages, however they are annoying to write by hand, and often converted from markdown anyway. mad(1) is effectively the same idea, but write your manuals in markdown like you would anyway, re-use them in your github readmes, wikis, or use markdown to HTML conversion tools.

mad(1) pipes to less(1) so you get the same paging / searching goodness that you expect from man(1).

Page repository

mad-pages is a collection of useful mad pages such as language operator precedence tables, http status codes, mime type tables etc. Use mad --update to install/re-install them.

These will, by default, be installed to the directory $HOME/.local/share/mad.

Page lookup

Use the MAD_PATH environment variable to control where mad(1) will look for a manual page. The ".md" extension may be omitted.

For example:

MAD_PATH="$HOME/mad"

The following paths will always be searched, after any MAD_PATH defined in the environment:

 - .
 - $HOME/.local/share/mad
 - /usr/local/share/mad
 - /usr/share/mad

Configuration

For its formatting rules, mad(1) installs and sources ../etc/mad.conf relative to mad's installation location (e.g., $HOME/.local/etc/mad.conf)

You may edit this file directly, or if you're scared of overwriting it when updating mad(1) you can copy this file to something like ~/.mad.conf and export MAD_CONFIG=~/.mad.conf.

heading: 1m
code: 90m
strong: 1m
em: 4m

Screenshots

Jade manual:

jade manual markdown

Author

TJ Holowaychuk https://github.com/tj