Man page editing made less painful.
This utility takes the path to a man page source file, then
- Generates an HTML version of how
man(1)
would render the page in a tty; - Opens the HTML page in the user's default web browser;
- Watches for changes in the source file, and updates the HTML page's content as necessary.
This utility started here, and was partially inspired by joeyespo/grip and mgedmin/restview.
Operating System | Support |
---|---|
OS X / macOS | ✓ — Primary target |
Linux | ✓ — Primary target |
Other flavors of BSD | Probably ✓ — Secondary target |
Other POSIX / UNIX | Possibly ✓ — No guarantee |
Windows NT | ✗ — Hmm, what is man? |
- A C++11 compiler;
- Python 3.3 or later;
- A modern web browser with support for server-sent events (no Microsoft for you!);
- Relative recent
autoconf
andautomake
.
Optional:
py-setproctitle
— used to set the server process title topmserver
, useful for monitoring server status (otherwise, the process will have a generic titlepython
).
$ autoreconf -i
$ ./configure
$ make
$ make install
The program is installed into /usr/local
by default. To install into a
different prefix, run
$ ./configure --prefix=/path/to/prefix
instead in the second step. Staged installation with DESTDIR
is also
supported by the install
target.
Note that although configure -h
shows an entire list of standard options,
only --prefix
is officially supported. In particular, the program relies on
the relative location of server.py
with respect to pm
, so one should NOT
mess with paths other than setting a custom prefix
.
To uninstall, simply replace the install
target with uninstall
.
$ brew install zmwangx/tap/pm
$ pm /path/to/man/page
Press ^C
when you are done.
- sveinbjornt/ManDrake — A native OS
X / macOS man page editor with live preview especially good for editing
mdoc
.
Copyright © 2016 Zhiming Wang
This work is free. You can redistribute it and/or modify it under the terms of
the Do What The Fuck You Want To Public License, Version 2, as published by Sam
Hocevar. See the COPYING
file for more details.