{"repo":"songpengwei/md2pdf","free":true,"listed":false,"github":"https://github.com/songpengwei/md2pdf","clone":"git clone https://github.com/songpengwei/md2pdf.git","description":"convert markdown to pdf/epub","language":"Python","stars":14,"topics":["markdown","markdown2pdf","pdf","markdown2epub"],"license":null,"category":"media-processing","readme_excerpt":"md2book A simple Python utility that turns Markdown collections into printable or digital books (PDF, EPUB, and MOBI). It can work with local Markdown files/directories or clone a GitHub repository (for example, a Docsify-powered documentation site) and export the result using configurable typography. Features - Accepts local Markdown files/directories or a GitHub repository URL. - YAML-based theming for fonts, colors, margins, and page sizing. - Automatic table of contents and optional page breaks per chapter. - Generates PDF (via WeasyPrint), EPUB (via EbookLib), and MOBI (via pypandoc or Calibre's ebook-convert ) outputs. - Sensible defaults to minimize required configuration. Installation WeasyPrint may require system libraries such as Cairo, Pango, and gdk-pixbuf. Refer to the WeasyPrint installation guide if you need to add OS packages on your Linux distribution. MOBI output depends on either pypandoc (with the pandoc binary installed) or Calibre's ebook-convert command-line tool; install one of them alongside the Python requirements. Usage - : One or more Markdown files, directories, or a GitHub repository URL (e.g., https://github.com/DistSysCorp/ddia ). When a repository URL is supplied, it will be cloned into a temporary folder and all Markdown files will be processed. Examples Convert a couple of local Markdown files into a PDF: Clone a GitHub repository and export both PDF and EPUB with a custom config: Process a directory tree of documentation: Generate a Kindle-","default_branch":null,"files":null,"tree":[],"storefront":"/r/songpengwei","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/songpengwei/md2pdf/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}