mirror of
https://github.com/Xevion/phototag.git
synced 2025-12-06 01:15:45 -06:00
Move constants into constants.py
This commit is contained in:
@@ -36,8 +36,3 @@ logger.info("Path constants built successfully...")
|
||||
|
||||
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = os.path.join(CONFIG_PATH, config.config["google"]["credentials"])
|
||||
|
||||
# Extension Constants
|
||||
RAW_EXTS = ["3fr", "ari", "arw", "bay", "braw", "crw", "cr2", "cr3", "cap", "data", "dcs", "dcr", "dng", "drf", "eip",
|
||||
"erf", "fff", "gpr", "iiq", "k25", "kdc", "mdc", "mef", "mos", "mrw", "nef", "nrw", "obm", "orf", "pef",
|
||||
"ptx", "pxn", "r3d", "raf", "raw", "rwl", "rw2", "rwz", "sr2", "srf", "srw", "tif", "x3f", ]
|
||||
LOSSY_EXTS = ["jpeg", "jpg", "jpe", "png"]
|
||||
|
||||
10
phototag/constants.py
Normal file
10
phototag/constants.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from pathlib import Path
|
||||
|
||||
# Root directory of the project
|
||||
PROJECT_ROOT: Path = Path(__file__).parent.parent
|
||||
|
||||
# Extension Constants
|
||||
RAW_EXTS = ["3fr", "ari", "arw", "bay", "braw", "crw", "cr2", "cr3", "cap", "data", "dcs", "dcr", "dng", "drf", "eip",
|
||||
"erf", "fff", "gpr", "iiq", "k25", "kdc", "mdc", "mef", "mos", "mrw", "nef", "nrw", "obm", "orf", "pef",
|
||||
"ptx", "pxn", "r3d", "raf", "raw", "rwl", "rw2", "rwz", "sr2", "srf", "srw", "tif", "x3f", ]
|
||||
LOSSY_EXTS = ["jpeg", "jpg", "jpe", "png"]
|
||||
@@ -12,7 +12,8 @@ from glob import glob
|
||||
from pathlib import Path
|
||||
from typing import List, Optional, Tuple, Generator
|
||||
|
||||
from phototag import LOSSY_EXTS, RAW_EXTS, CWD
|
||||
from phototag import CWD
|
||||
from phototag.constants import LOSSY_EXTS, RAW_EXTS
|
||||
from phototag.exceptions import PhototagException, InvalidSelectionError
|
||||
|
||||
ALL_EXTENSIONS = RAW_EXTS + LOSSY_EXTS
|
||||
|
||||
@@ -21,7 +21,8 @@ from PIL import Image
|
||||
from google.cloud import vision
|
||||
from rich.progress import Progress
|
||||
|
||||
from phototag import TEMP_PATH, RAW_EXTS, CWD
|
||||
from phototag import TEMP_PATH, CWD
|
||||
from phototag.constants import RAW_EXTS
|
||||
from phototag.exceptions import InvalidConfigurationError, NoSidecarFileError
|
||||
from phototag.helpers import random_characters
|
||||
from phototag.xmp import XMPParser
|
||||
|
||||
Reference in New Issue
Block a user