some stuff idk what I've done lol
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
pillow
|
||||
pyyaml
|
||||
python-magic
|
||||
python-magi
|
||||
progressbar
|
||||
virtualenv
|
||||
requests
|
||||
filetype
|
||||
python-i18n[YAML]
|
||||
python-i18n[YAML]
|
||||
pyinstaller
|
||||
@@ -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():
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user