Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
8a27eaa
#26 add exceptions classes to exceptions.py
bransoned Dec 23, 2025
aa20aa8
#26 remove exceptions from script.py
bransoned Dec 23, 2025
221b7c5
#26 add validator function to validators.py
bransoned Dec 23, 2025
95ff832
#26 remove validator function from script.py
bransoned Dec 23, 2025
0469529
#26 add dependency functions to dependencies.py
bransoned Dec 23, 2025
83d4088
#26 remove dependency functions from script.py
bransoned Dec 23, 2025
ca27bc6
#26 add parsing functions to parsers.py
bransoned Dec 23, 2025
a4c997a
#26 remove parsing functions from parsers.py
bransoned Dec 23, 2025
32e9e98
#26 add metadata writing functions to metadata.py
bransoned Dec 23, 2025
a8036c0
#26 remove metadata writing functions from script.py
bransoned Dec 23, 2025
79f6a21
#26 remove jpg overlay function from script.py
bransoned Dec 23, 2025
3f924bf
#26 add jpg overlay function to media_processing.py
bransoned Dec 23, 2025
3ab4d9a
#26 remove mp4 overlay function from script.py
bransoned Dec 23, 2025
f6cb857
#26 add mp4 overlay function to media_processing.py
bransoned Dec 23, 2025
811cabe
#26 remove downlader functions from script.py
bransoned Dec 23, 2025
9b5f9a0
#26 add downloader functions to downloaders.py
bransoned Dec 23, 2025
d6094c9
#26 remove main function from script.py
bransoned Dec 23, 2025
d846c83
#26 add main function to main.py
bransoned Dec 23, 2025
2ad005e
#26 add exceptions file to downloaders
bransoned Dec 23, 2025
1983bc8
#26 add exceptions file to validators
bransoned Dec 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,074 changes: 1 addition & 1,073 deletions script.py

Large diffs are not rendered by default.

70 changes: 70 additions & 0 deletions src/dependencies.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import sys
from pathlib import Path
import shutil
from .exceptions import *

# =========================================================================== #

"""
Find exiftool executable

Returns:
Path to exiftool

Raises:
DependencyError: If exiftool cannot be found
"""
def find_exiftool() -> str:

exe_name = "exiftool.exe" if sys.platform.startswith("win") else "exiftool"

# If bundle
if getattr(sys, "frozen", False):
base = Path(sys._MEIPASS)
bundled = base / "bin" / exe_name
if bundled.exists():
return str(bundled)

# Try system PATH
system_path = shutil.which(exe_name)
if system_path:
return system_path

raise DependencyError(
"Exiftool not found. Please install exiftool or use the provided bundled executable."
"For further installation instructions, reference the README."
)

# =========================================================================== #

"""
Find ffmpeg executable.

Returns:
Path to ffmpeg

Raises:
DependencyError: If ffmpeg cannot be found
"""
def find_ffmpeg() -> str:

exe_name = "ffmpeg.exe" if sys.platform.startswith("win") else "ffmpeg"

# If bundle
if getattr(sys, "frozen", False):
base = Path(sys._MEIPASS)
bundled = base / "bin" / exe_name
if bundled.exists():
return str(bundled)

# Try system PATH
system_path = shutil.which(exe_name)
if system_path:
return system_path

raise DependencyError(
"FFMpeg not found. Please install ffmpeg or use the provided bundled executable."
"For further installation instructions, reference the README."
)

# =========================================================================== #
Loading