7

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...
1
  • 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
    Commented Apr 15, 2013 at 17:06

1 Answer 1

6

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.

10
  • I looked at Calibre; love it! then the question becomes, how do I create man output in RTF, instead of PS?
    – Felix
    Commented Apr 15, 2013 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
    Commented Apr 15, 2013 at 2:58
  • yes, I was not aware of such utility!
    – Felix
    Commented Apr 15, 2013 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
    Commented Apr 15, 2013 at 9:04
  • That is a very helpful!
    – Vincent
    Commented Apr 15, 2013 at 13:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .