|
|
@ -6,9 +6,8 @@ import shutil
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def scan_document_folder() -> None:
|
|
|
|
def scan_document_folder() -> None:
|
|
|
|
"""Scan Input Odner für OCR Analyse und Verarbeitung der Bilder
|
|
|
|
"""Scan Input Ordner fuer OCR Analyse und Verarbeitung der Bilder
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
# Read Config, Setup
|
|
|
|
|
|
|
|
ocr_config = ConfigParser()
|
|
|
|
ocr_config = ConfigParser()
|
|
|
|
ocr_config.read("ocr_config.ini")
|
|
|
|
ocr_config.read("ocr_config.ini")
|
|
|
|
ocr_settings = ocr_config['ocr']
|
|
|
|
ocr_settings = ocr_config['ocr']
|
|
|
@ -50,7 +49,7 @@ def export_to_mount(symlinks=False, ignore=None) -> None:
|
|
|
|
"""Export zu einem externen Folder(z.b. NAS Mount)
|
|
|
|
"""Export zu einem externen Folder(z.b. NAS Mount)
|
|
|
|
|
|
|
|
|
|
|
|
Args:
|
|
|
|
Args:
|
|
|
|
symlinks (bool, optional): Config, ob shutil symlinks berücksichtigen soll. Defaults to False.
|
|
|
|
symlinks (bool, optional): Config, ob shutil symlinks beruecksichtigen soll. Defaults to False.
|
|
|
|
ignore (str, optional): Config, ob shutil gewisse Files ignorieren soll. Defaults to None.
|
|
|
|
ignore (str, optional): Config, ob shutil gewisse Files ignorieren soll. Defaults to None.
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
# Read Config, Setup
|
|
|
|
# Read Config, Setup
|
|
|
@ -67,6 +66,14 @@ def export_to_mount(symlinks=False, ignore=None) -> None:
|
|
|
|
shutil.copytree(s, d, symlinks, ignore)
|
|
|
|
shutil.copytree(s, d, symlinks, ignore)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
shutil.copy2(s, d)
|
|
|
|
shutil.copy2(s, d)
|
|
|
|
|
|
|
|
shutil.rmtree(s)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def match_tags():
|
|
|
|
|
|
|
|
# Match Tags aus der Config fuer Doc-Renaming
|
|
|
|
|
|
|
|
# je nachdem welche Worte im Dokument vorhanden sind wird das Dokument umbenannt
|
|
|
|
|
|
|
|
# Todo einbauen wenn notwendig
|
|
|
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
if __name__ == "__main__":
|
|
|
|