A simple cli tool that prints (or saves) man pages in a PDF file for an easier reading.
A simple tool that prints (or saves) man pages in a PDF file via Zathura for an easier reading.
It also allows you to navigate through all the man pages available on your system via Rofi or Dmenu.
Install the zaman AUR package.
Make sure you also have a zathura PDF backend installed (either zathura-pdf-poppler or zathura-pdf-mupdf) as well as a dynamic menu (either rofi or dmenu).
Install dependencies:
- Replace
zathura-pdf-poppler
byzathura-pdf-mupdf
if you prefer to use themupdf
backend. - Replace
rofi
bydmenu
if you prefer to use that (it's calledsuckless-tools
on Debian/Ubuntu).
sudo apt install man-db groff zathura zathura-pdf-poppler rofi
sudo dnf install man-db groff groff-perl "perl(Compress::Zlib)" zathura zathura-pdf-poppler rofi
sudo pacman -S man-db groff zathura zathura-pdf-poppler rofi
sudo emerge man-db groff zathura zathura-pdf-poppler rofi
Download the archive of the latest stable release and extract it (alternatively, you can clone this repository via git
).
To install zaman
, go into the extracted/cloned directory and run the following command:
sudo make install
To uninstall zaman
, go into the extracted/cloned directory and run the following command:
sudo make uninstall
Run the zaman
command in your terminal to display a list of all the available man pages on your system (via Rofi or Dmenu), allowing you to search for the one to print as a PDF.
Alternatively, you can directly specify the man page to open in the command (example below with the "ls" man page):
The man page will open as a PDF file in Zathura. Just press q
to quit, as you would normally do when reading a man page:
You can save a specific man page in a PDF file called "man_command
.pdf" in your current directory with the -O
(or --save
) option (if you run zaman -O
without specifying a man page to save, zaman
will offer you to select one via rofi/dmenu):
Alternatively, you can specify the destination file with the -o
(or --output
) option:
Directly specify the man page to print as a PDF in the command: zaman 'man page to open'
e.g.: zaman ls
Options:
-m, --menu Print a menu via rofi or dmenu that lists every man pages to choose from (default operation)
-o, --output <man page> <file> Save <man page> into the <file> PDF file
-O, --save <man page> Save <man page> into the "man_<man page>.pdf" file in the current directory; if <man page> isn't specified, open a menu via rofi or dmenu that lists every man pages to choose from
-h, --help Display this message and exit
-V, --version Display version information and exit
Exit codes:
0 OK
1 Invalid option or man page
2 Neither `rofi` nor `dmenu` are installed
3 User didn't gave the confirmation to proceed
4 User didn't specified a man page or a file to save it to in the -o/--output option
For more information, see the zaman(1) man page
You can raise your issues, feedbacks and suggestions in the issues tab.
Pull requests are welcomed as well!