some stuff idk what I've done lol

This commit is contained in:
2025-07-20 02:36:00 +02:00
parent 1486203dd2
commit a91668522a
5 changed files with 8 additions and 7 deletions

View File

@@ -1,8 +1,9 @@
pillow pillow
pyyaml pyyaml
python-magic python-magi
progressbar progressbar
virtualenv virtualenv
requests requests
filetype filetype
python-i18n[YAML] python-i18n[YAML]
pyinstaller

View File

@@ -1,8 +1,9 @@
import yaml import yaml
import os import os
from pathlib import Path
workdir, filename = os.path.split(os.path.abspath(__file__)) 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(): def get_config():

View File

@@ -1,8 +1,8 @@
# src (source) is the path, were the images are, that should be sorted # 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 (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 # de, en, fr, it, ru, uk
language: "en" language: "en"

View File

@@ -13,4 +13,3 @@ class ExifData:
if len(self.day) < 2: self.day = "0" + self.day if len(self.day) < 2: self.day = "0" + self.day
if len(self.month) < 2: self.month = "0" + self.month if len(self.month) < 2: self.month = "0" + self.month
if len(self.year) < 2: self.year = "0" + self.year if len(self.year) < 2: self.year = "0" + self.year

View File

@@ -21,7 +21,7 @@ def sort_pictures(images:list, dst:str, logger:logging.Logger):
for image in images: for image in images:
image:ExifData image:ExifData
if not image: continue 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) image_dst = os.path.join(path, image.name)
if not os.path.exists(path): os.makedirs(path, exist_ok=True) if not os.path.exists(path): os.makedirs(path, exist_ok=True)