diff --git a/phototag/__init__.py b/phototag/__init__.py index 7112ae6..e97761e 100644 --- a/phototag/__init__.py +++ b/phototag/__init__.py @@ -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"] diff --git a/phototag/constants.py b/phototag/constants.py new file mode 100644 index 0000000..e5a58de --- /dev/null +++ b/phototag/constants.py @@ -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"] diff --git a/phototag/helpers.py b/phototag/helpers.py index 967e2a1..71e1586 100644 --- a/phototag/helpers.py +++ b/phototag/helpers.py @@ -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 diff --git a/phototag/process.py b/phototag/process.py index a8e471a..bd0a95b 100644 --- a/phototag/process.py +++ b/phototag/process.py @@ -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