6

I can convert man output to PDF. First, man -t grep >grep.ps (grep is just an example; I am not looking for mobile version of grep man page). Then Adobe Distiller converts PostScript to PDF. However, PDF looks terrible on the tablet (can't re-size, etc). I see several programs that convert to mobi and epub formats, but none of them take Postscript as input. Some take PDF as input, but output is usually very difficult to read – even worse than original PDF.

So, how can I convert man output to mobile format (epub, mobi, or fb2)?

  • Change man / groff output to produce something that mobile generators like;

or

  • Convert PS to mobile format; or
  • Some other way that I can't think of...
  • man -Tpdf grep > grep.pdf would do for PDF... at least my Kindle reads PDF fine (and reformatting a man page for page margins will give a mess) – vonbrand Apr 15 '13 at 17:06
5

You could use the open source software Calibre (http://calibre-ebook.com).

It is available for OSX, Windows, and Linux.

Input Formats: CBZ, CBR, CBC, CHM, DJVU, EPUB, FB2, HTML, HTMLZ, LIT, LRF, MOBI, ODT, PDF, PRC, PDB, PML, RB, RTF, SNB, TCR, TXT, TXTZ

Output Formats: AZW3, EPUB, FB2, OEB, LIT, LRF, MOBI, HTMLZ, PDB, PML, RB, PDF, RTF, SNB, TCR, TXT, TXTZ

I think for the best results you just output the man page to html using a manpage-to-html converter: http://dcssrv1.oit.uci.edu/indiv/ehood/man2html.html.

  • I looked at Calibre; love it! then the question becomes, how do I create man output in RTF, instead of PS? – Felix Apr 15 '13 at 2:55
  • I was a bit to fast. I think if you want to keep the formatting, you could export the man file to html (before the conversion to ePub): linux.die.net/man/1/man2html Would that be an option? – Vincent Apr 15 '13 at 2:58
  • yes, I was not aware of such utility! – Felix Apr 15 '13 at 3:02
  • 1
    There are two different mans used on linux. One of them has a man -H option that will render the page in $BROWSER as html, which you can then save. – goldilocks Apr 15 '13 at 9:04
  • That is a very helpful! – Vincent Apr 15 '13 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.