mlwerke2pdf/README.md

30 lines
1017 B
Markdown

# 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)