Python module to convert texts on http://www.mlwerke.de into pdfs
Go to file
Paul 6286ebc7f6 extended readme 2023-04-07 20:05:36 +02:00
.gitignore added gitignore 2023-04-07 18:41:14 +02:00
LICENSE Initial commit 2023-04-07 18:33:52 +02:00
README.md extended readme 2023-04-07 20:05:36 +02:00
mlwerke2pdf.py extended readme 2023-04-07 18:47:21 +02:00

README.md

mlwerke2pdf

Python module to convert texts on http://www.mlwerke.de into Portable Document Format files

mlwerke2pdf fetches the linked subsites from the given table of contents and concats them to a single pdf

at this point links and linked images in the pdf are not functional as they point to the mlwerke html structure converting them to pdf internal links would be possible but rather complex

dependencies

as pdfkit uses wkhtmltopdf you will need it. See https://pypi.org/project/pdfkit/ for instructions

Usage

create MLWerke Object:

mlwerk = mlwerke2pdf.MLWerk(URL)

use the base / table of contents of a text like http://www.mlwerke.de/me/me04/me04_459.htm as URL

generate a pdf

mlwerk.text2pdf(PDF_OUTPUT_PATH)

or cominded into one line

mlwerke2pdf.MLWerk(URL).text2pdf(PDF_OUTPUT_PATH)