Compare commits
2 Commits
83ec148b85
...
main
Author | SHA1 | Date | |
---|---|---|---|
74a5381bec | |||
470ec46f6e |
4
main.py
4
main.py
@ -18,7 +18,7 @@ def main():
|
||||
parser.add_argument('--pages', type=str, required=True, help='Specify pages to parse in format <num>-<num>')
|
||||
parser.add_argument('--output-file', type=str, default='out.md', help='Specify output file')
|
||||
parser.add_argument('--images-path', type=str, default='./.img/', help='Specify output file')
|
||||
parser.add_argument('--ocr', type=str, default=None, help='If present, send ocr=true to the image_to_anki method, and give the string value to the lang parameter')
|
||||
parser.add_argument('--ocr', type=str, default=None, help='languages to use for local OCR, e.g. deu+chi_sim for german and simplified chinese (tesseract langpacks needed)')
|
||||
parser.add_argument('--batch-size', type=int, default=3, help='Decide how many pages are processed in parallel')
|
||||
parser.add_argument('pdf_file', type=str, help='Specify PDF file name')
|
||||
|
||||
@ -82,7 +82,7 @@ def main():
|
||||
cards, meta = dict_to_anki.image_to_anki(to_process, do_ocr=ocr, lang=args.ocr)
|
||||
|
||||
if not cards:
|
||||
print("Error processing! Response: " + meta)
|
||||
print("Error processing! Response: " + str(meta))
|
||||
user_response = input("Retry? [y/N] > ")
|
||||
if user_response != 'y' or 'yes' or 'Y' or 'YES' or 'Yes':
|
||||
break_outer = True
|
||||
|
Reference in New Issue
Block a user