mlwerke2pdf/mlwerke2pdf_shutil.py

13 lines
661 B
Python

import mlwerke2pdf
import argparse
parser = argparse.ArgumentParser(
prog='MLWerke2PDF',
description='convert texts on http://www.mlwerke.de into Portable Document Format files',
epilog='published under GPL-3 at https://git.roteserver.de/humorhenker/mlwerke2pdf')
parser.add_argument('-u', '--url', dest='url', help='base / table of contents of a text like http://www.mlwerke.de/me/me04/me04_459.htm', required=True)
parser.add_argument('-o', '--pdfpath', dest='pdfpath', help='path for the output pdf', required=True)
args = parser.parse_args()
mlwerke2pdf.MLWerk(args.url).text2pdf(args.pdfpath)