man2book is a tool to create a custom book of installed man pages or a selection of manpage sections and pages.
  • Python 95%
  • HTML 4.7%
  • Makefile 0.3%
Find a file
Johannes Findeisen ca012825a9 0.1.0 ist the first stable version, but it is only producing single HTML files for now, not complete books.
I cleaned up all logic and made the code look beautiful. There no known bugs. It is stable!

It only produces single HTML files for now but the next step will be an easy task now.
2022-10-20 01:26:18 +02:00
out 0.1.0 ist the first stable version, but it is only producing single HTML files for now, not complete books. 2022-10-20 01:26:18 +02:00
.gitignore 0.1.0 ist the first stable version, but it is only producing single HTML files for now, not complete books. 2022-10-20 01:26:18 +02:00
LICENSE Initial commit of the first prototype. 2022-10-19 00:54:19 +02:00
Makefile I never wrote such a crazy script. Thousands of errors but everything is just fine... :) 2022-10-19 13:04:46 +02:00
man2book 0.1.0 ist the first stable version, but it is only producing single HTML files for now, not complete books. 2022-10-20 01:26:18 +02:00
README.md Some cleanups and fixes. 2022-10-19 13:48:00 +02:00
requirements.txt Some cleanups and fixes. 2022-10-19 13:48:00 +02:00

man2book

A tool to convert all installed man pages to a simple ebook or other formats with contents in the head.

Maybe this could be only a small shell script but if not I will use Python. - It is Python now... :)

Why man pages as book?

Because I want to read them comfortable on my ebook reader when traveling but all man pages in one book. Not more... ;)

Helpful libraries and tools

Workflow

  1. Read manpage sections
  2. Create HTML file for each manpage in each section
  3. Read and store title(metadata) for in each file
  4. Remove all unneeded stuff like html, head and body in each file
  5. Create TOC for the entire ebook
  6. Create a header HTML file for the ebook containing the head tag
  7. Merge toc and content of all files for preparing the ebook
  8. Merge the header file with the prepared ebook while inserting html and body tags which should result in a valid HTML file
  9. Create ebook from the resulting HTML file using Pandoc