Python module to convert texts on http://www.mlwerke.de into pdfs
Go to file
Paul e11e808613 added shutil 2023-04-07 20:44:52 +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 added shutil 2023-04-07 20:44:52 +02:00
mlwerke2pdf.py extended readme 2023-04-07 18:47:21 +02:00
mlwerke2pdf_shutil.py added shutil 2023-04-07 20:44:52 +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 as commandline util

python mlwerke2pdf_shutil.py -u URL -o PDF_OUTPUT_PATH

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

Usage as Python module

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)