Links
- Hurricane Electric’s http://man.he.net is pretty simple and seems like it has no ads or JavaScript. Doesn’t have HTTPS either.
- man.cx has manpages online. Seems like it might have fewer ads than others?
- Man-db source
- https://gitlab.com/man-db/man-db/
- Man-db website
- https://man-db.gitlab.io/man-db/
Format a man page as XHTML:
man -Txhtml ls > ls.xhtml
Here’s how to output plain ASCII without ANSI escape sequences:
MANWIDTH=80 man -Z -Tascii ls | grotty -c
Here’s how to find out where a manpage is located:
$ man --where ls /nix/store/jmy11m3c935yyvs4njz3s52p9azgvg6f-coreutils-full-9.3/share/man/man1/ls.1.gz
You can format this local file like so:
man -l /nix/store/jmy11m3c935yyvs4njz3s52p9azgvg6f-coreutils-full-9.3/share/man/man1/ls.1.gz
If you use Nix shells a lot, here’s a script that’ll open a man page within Emacs:
#!/usr/bin/env bash
# This just looks up a man page but opens it with emacs.
# I use this within nix shells, where man paths aren't visible in the global environment.
set -euo pipefail
theloc="$(man --where "$1")"
emacsclient --create-frame --no-wait --eval "(man \"$theloc\")"