Skip to content

zmwangx/pm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pm

Latest release License: WTFPL

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.

Supported Operating Systems

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?

Prerequisites

  • 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 and automake.

Optional:

  • py-setproctitle — used to set the server process title to pmserver, useful for monitoring server status (otherwise, the process will have a generic title python).

Installation

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

Using a package manager

Homebrew

$ brew install zmwangx/tap/pm

Usage

$ pm /path/to/man/page

Press ^C when you are done.

Screenshot

Screenshot of pm(1).

See Also

License

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.