Clean up mkbinder arg parser
This commit is contained in:
parent
f02bfd943a
commit
70bd8774d1
16
mkbinder.py
16
mkbinder.py
|
@ -1,18 +1,22 @@
|
|||
#!/usr/bin/env python3
|
||||
import pdfkit
|
||||
import weasyprint
|
||||
|
||||
import re
|
||||
import os
|
||||
import argparse
|
||||
from argparse import ArgumentParser
|
||||
import pickle
|
||||
|
||||
# PDF conversion backends
|
||||
import pdfkit
|
||||
import weasyprint
|
||||
|
||||
from htmldate import find_date
|
||||
from datetime import date
|
||||
|
||||
|
||||
# CLI arguments
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--backend', '-b', dest = 'backend', help = 'change the download backend; default: pdfkit', default = 'pdfkit', choices = ['pdfkit', 'weasyprint'])
|
||||
parser.add_argument('--force', '-f', dest = 'force', help = 'force download all links instead of only the ones that need to be updated; default: False', default = False, choices = [False, True])
|
||||
parser = ArgumentParser()
|
||||
parser.add_argument('--backend', '-b', help = 'change the download backend', default = 'pdfkit', choices = ['pdfkit', 'weasyprint'])
|
||||
parser.add_argument('--force', '-f', help = 'force download all links', action='store_false')
|
||||
args = parser.parse_args()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue