diff --git a/requirements.txt b/requirements.txt index bf2a17f..ba9450e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,9 @@ pillow pyyaml -python-magic +python-magi progressbar virtualenv requests filetype -python-i18n[YAML] \ No newline at end of file +python-i18n[YAML] +pyinstaller \ No newline at end of file diff --git a/src/config.py b/src/config.py index 5bdafd4..555675c 100644 --- a/src/config.py +++ b/src/config.py @@ -1,8 +1,9 @@ import yaml import os +from pathlib import Path workdir, filename = os.path.split(os.path.abspath(__file__)) -config_file = os.path.join(workdir, 'config.yml') +config_file = os.path.join(Path.home(), 'config.yml') def get_config(): diff --git a/src/config.yml b/src/config.yml index 9cab206..9388847 100644 --- a/src/config.yml +++ b/src/config.yml @@ -1,8 +1,8 @@ # src (source) is the path, were the images are, that should be sorted -src: "../app/Temp" +src: "/home/hendrik/Bilder/Temp" # dst (destination) ist the path, were the images are going to be sorted -dst: "../app/Bilder" +dst: "/home/hendrik/Bilder/Sort" # de, en, fr, it, ru, uk language: "en" diff --git a/src/exif_data.py b/src/exif_data.py index bdd3289..80f1e0e 100644 --- a/src/exif_data.py +++ b/src/exif_data.py @@ -13,4 +13,3 @@ class ExifData: if len(self.day) < 2: self.day = "0" + self.day if len(self.month) < 2: self.month = "0" + self.month if len(self.year) < 2: self.year = "0" + self.year - \ No newline at end of file diff --git a/src/file_handler.py b/src/file_handler.py index 5bef61b..c5f8ace 100644 --- a/src/file_handler.py +++ b/src/file_handler.py @@ -21,7 +21,7 @@ def sort_pictures(images:list, dst:str, logger:logging.Logger): for image in images: image:ExifData if not image: continue - path = os.path.join(dst, str(image.make), str(image.year), str(image.month), str(image.day)) + path = os.path.join(dst, str(image.year), str(image.month), str(image.day)) image_dst = os.path.join(path, image.name) if not os.path.exists(path): os.makedirs(path, exist_ok=True)