{"id":18785051,"url":"https://github.com/hanez/man2book","last_synced_at":"2025-06-19T08:10:09.429Z","repository":{"id":77320611,"uuid":"552627466","full_name":"hanez/man2book","owner":"hanez","description":"man2book is a tool to create a custom book of installed man pages or a selection of manpage sections and pages. (mirror)","archived":false,"fork":false,"pushed_at":"2023-08-29T00:09:43.000Z","size":34,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T06:37:13.661Z","etag":null,"topics":["book","ebook","epub","generator","man","manpage","pandoc"],"latest_commit_sha":null,"homepage":"https://git.xw3.org/hanez/man2book","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hanez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-17T01:08:30.000Z","updated_at":"2024-10-16T01:16:52.000Z","dependencies_parsed_at":"2024-11-07T20:46:31.710Z","dependency_job_id":"ca11ff30-316f-4807-96c9-c68233d3c6bb","html_url":"https://github.com/hanez/man2book","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hanez/man2book","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanez%2Fman2book","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanez%2Fman2book/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanez%2Fman2book/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanez%2Fman2book/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hanez","download_url":"https://codeload.github.com/hanez/man2book/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hanez%2Fman2book/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260713353,"owners_count":23050827,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["book","ebook","epub","generator","man","manpage","pandoc"],"created_at":"2024-11-07T20:44:49.978Z","updated_at":"2025-06-19T08:10:04.330Z","avatar_url":"https://github.com/hanez.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# man2book\n\nman2book is a tool to create a custom book of installed man pages or a\nselection of manpage sections and / or pages.\n\n**After only one day of development the first stable code is here. At all it took me about two\ndays thinking about to start coding my idea... Here is the result!**\n\n**\\o/**\n\nHope this is useful to someone. Have fun!\n\n## FAQ\n\n### Why man pages as a book?\n\nBecause I want to read them comfortable on my ebook reader when traveling but all or some selected\nman pages in one or multiple books. Not more... ;)\n\n### Which manpage sections are supported by man2book?\n\nCurrently, the following manpage sections are supported, but it can support other custom sections:\n\n1. User commands; man-pages includes a small number of Section 1 pages that document programs\nsupplied by the GNU C library.\n2. System calls documents the system calls provided by the Linux kernel.\n3. Library functions documents the functions provided by the standard C library.\n4. Devices documents details of various devices, most of which reside in /dev.\n5. Files describes various file formats and filesystems, and includes proc(5), which documents\nthe /proc file system.\n7. Overviews, conventions, and miscellaneous.\n8. Superuser and system administration commands; man-pages includes a small number of Section 8\npages that document programs supplied by the GNU C library.\n\nSource: [https://www.kernel.org/doc/man-pages/](https://www.kernel.org/doc/man-pages/)\n\n## Helpful libraries and tools\n\n- https://pandoc.org/ - Haskell - Then maybe make use of https://pypi.org/project/pandocfilters/,\n  https://pypi.org/project/pypandoc/ or https://pypi.org/project/pandoc/.\n  (very mature features for document conversion like direct manpage input and epub output,\n  but I don't know much about pandoc, so I need to discover this.)\n- ~~https://www.gnu.org/software/groff/\n  (man -Thtml df \u003e df.html)~~\n- ~~https://linux.die.net/man/1/man2html\n  (is nice because it must not generate html, head and body)~~\n- ~~https://pypi.org/project/epubmaker/ - Python\n  (maybe nice but unmaintained)~~\n- ~~https://docutils.sourceforge.io/ - Python\n  (as I can see now it only converts from .rst files.)~~\n\n## Workflow\n\n1. ~~Read manpage sections~~\n2. ~~Create HTML file for each manpage in each section~~\n3. ~~Read and store title(metadata) for in each file~~\n4. ~~Remove all unneeded stuff like html, head and body in each file~~\n5. ~~Create TOC for the entire ebook~~\n6. Create a header HTML file for the ebook containing the head tag\n7. Merge toc and content of all files for preparing the ebook\n8. Merge the header file with the prepared ebook while inserting html and body\n   tags which should result in a valid HTML file\n9. Create ebook from the resulting HTML file using Pandoc\n\n## Future\n\nWhen the above steps are done, and we could build a complete book there are some\nfeature ideas:\n\n- Some kind of template for the book including a cover.\n- Image support for the cover.\n- Maybe a footer for pages and the complete book.\n- Page numbers on all pages after the table of contents. Like in real books.\n- Support all output formats of Pandoc. This should be easy since I do not do any\n  special here. Pandoc is my base converter /generator.\n- Maybe support for other converters / generators.\n- Links to other man pages as mentioned in the footer of all man pages, e.g.: pam(8).\n  But only if available in the current book.\n- Maybe a progress bar instead of printing for every file being processed\n(https://www.geeksforgeeks.org/progress-bars-in-python/).\n\n## Bugs\n\n- Includes in man pages does not work. Need to discover this, but I do not\nknow how to solve this and if Pandoc supports that (maybe when setting some include\npath somewhere?).\n\n## Links\n\n- [The Linux man-pages project](https://www.kernel.org/doc/man-pages/) - I found this\nproject after researching a little for my idea and it inspired me a lot to start my project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanez%2Fman2book","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhanez%2Fman2book","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhanez%2Fman2book/lists"}