Amazon Kindle (Scribe) - Manual Page to HTML/EPUB
2025.04.08
WORK IN PROGRESS
These are some updated notes for converting Linux manual pages to
HTML
for sending via Amazon "Send to Kindle", or converting directly to
EPUB.
As I can recall, the best HTML producing rendering method was VIM.
The following examples utilize the Dash manual page, a minimal
Bourne
Shell scripting language.
SED
$ sed 's/\(background-color\|color\): #[A-Z|a-z|0-9]\{6\}; //g'
test.html
GROFF
$ cat /usr/share/man/man1/dash.1 | groff -mandoc -Thtml >
dash-man.html
VIM (Preferred Method)
First set color theme to basic ":colorscheme basic" and ":set
bg=light",
and enter ":TOhtml" command.
Lastly, save the VIM converted text to HTML file. Great for
converting source code text files to HTML.
VIM Command Line (Not Tested)
$ vim -E -s -c "let g:html_no_progress=1" -c "syntax on" -c "set
ft=html" -c "runtime syntax/2html.vim" -c "colorscheme=basic" -c
"set
bg=light" -cwqa file.txt
NOTE: The rendered HTML file will likely require further editing,
adjusting the
title tag for Amazon Send To Kindle for providing a good book title.