14 lines
777 B
Python
14 lines
777 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)
|
|
parser.add_argument('--dry', dest='dryrun', default=False, help="dont store any files just dry fetch")
|
|
|
|
args = parser.parse_args()
|
|
|
|
mlwerke2pdf.MLWerk(args.url).text2pdf(args.pdfpath, args.dryrun) |