extended readme

This commit is contained in:
Paul 2023-04-07 20:05:36 +02:00
parent 5815c0c044
commit 6286ebc7f6
1 changed files with 12 additions and 5 deletions

View File

@ -1,18 +1,25 @@
# mlwerke2pdf # mlwerke2pdf
Python module to convert texts on http://www.mlwerke.de into pdfs 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
it this point links in the pdf are not functional as they point to the mlwerke html structure
# dependencies # dependencies
as pdfkit uses wkhtmltopdf you will need it as pdfkit uses wkhtmltopdf you will need it. See https://pypi.org/project/pdfkit/ for instructions
# Usage # Usage
## create MLWerke Object: ## create MLWerke Object:
mlwerk = mlwerke2pdf.MLWerk(URL) mlwerk = mlwerke2pdf.MLWerk(URL)
use the base of a text like http://www.mlwerke.de/me/me04/me04_459.htm as 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 ## generate a pdf
mlwerk.text2pdf(PDF_OUTPUT_PATH) mlwerk.text2pdf(PDF_OUTPUT_PATH)
## or cominded into one line
mlwerke2pdf.MLWerk(URL).text2pdf(PDF_OUTPUT_PATH)