Add progress bar

master
Dan Howe 7 years ago
parent 9d5eb32b08
commit 65015d4f2e

@ -39,10 +39,10 @@ __email__ = "d.howe@wrl.unsw.edu.au"
import os
import glob
import shutil
import argparse
import subprocess
import shutil
from tqdm import tqdm
def pdf_unlock(pdf_file, overwrite=False):
# Create suffix for unlocked pdfs
@ -101,7 +101,10 @@ def main():
pdf_files = glob.glob(glob_str, recursive=args.recursive)
for pdf_file in pdf_files:
pbar = tqdm(pdf_files)
for pdf_file in pbar:
pdf_file_shortname = os.path.split(pdf_file)[1]
pbar.set_description('Processing {}'.format(pdf_file_shortname))
pdf_unlock(pdf_file, overwrite=args.overwrite)

Loading…
Cancel
Save