@@ -0,0 +1,1131 @@
+#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0A%0Aimport os%0Aimport shutil%0Aimport time%0A%0Afrom sjkscan import postprocessing%0A%0A%0Adef main():%0A    %22%22%22TODO: Docstring for main.%0A    :returns: TODO%0A%0A    %22%22%22%0A    DATA_DIR = '/Users/sjk/Code/sjkscan/data'%0A    while True:%0A        for entry in os.scandir(DATA_DIR):%0A            if not entry.name.startswith('finished-') or not entry.is_dir():%0A                continue%0A%0A            scan_dir = os.path.join(DATA_DIR, entry.name)%0A%0A            postprocessing.move_blanks(scan_dir,%0A                                       os.path.join(scan_dir, 'blank'))%0A%0A            postprocessing.rotate_all_images_in_dir(scan_dir, 180)%0A%0A            postprocessing.ocr_pnms_in_dir(scan_dir, 'swe')%0A%0A            pdf_output = os.path.join(scan_dir, 'output.pdf')%0A            postprocessing.merge_pdfs_in_dir(scan_dir, pdf_output)%0A%0A            inbox_dir = os.path.join(DATA_DIR, 'INBOX')%0A%0A            try:%0A                os.mkdir(inbox_dir)%0A            except:%0A                pass  # Assume directory exists.%0A%0A            shutil.move(scan_dir, inbox_dir)%0A%0A        time.sleep(1)%0A%0A%0Aif __name__ == %22__main__%22:%0A    main()%0A

Add experimental version of scand