47 lines
1.2 KiB
Python
47 lines
1.2 KiB
Python
# package/__init__.py
|
|
import os
|
|
|
|
# 1. Package Metadata
|
|
__version__ = "1.0.0"
|
|
__author__ = "Richard Allen"
|
|
|
|
# 2. Initialization Logic
|
|
print("Initializing package...")
|
|
|
|
# Ensure a required directory exists when the package loads
|
|
CACHE_DIR = os.path.join(os.path.expanduser("~"), ".package_cache")
|
|
os.makedirs(CACHE_DIR, exist_ok=True)
|
|
|
|
# 3. Expose Database Tools (Added)
|
|
# Replace 'DatabaseClient' and 'connect_to_db' with your actual class/function names
|
|
from .video_editing.build_shorts import fit_to_9_16_letterbox
|
|
from .build_videos import build_videos
|
|
from .config import CHANNEL_NAME, TZ, DB
|
|
from .hash_tags import get_top_nouns
|
|
from .process_uploads import process_uploads
|
|
from .transcribe_video import transcribe_to_srt
|
|
from .utils import get_chapters, get_video_id_from_chat, write_csv, run_command
|
|
|
|
# 4. Expose Subpackages
|
|
from . import twitch
|
|
from . import youtube
|
|
from . import database
|
|
|
|
# (Optional) Defines what is exposed during 'from package import *'
|
|
__all__ = [
|
|
"fit_to_9_16_letterbox"
|
|
"build_videos",
|
|
"CHANNEL_NAME",
|
|
"TZ",
|
|
"DB",
|
|
"get_top_nouns",
|
|
"process_uploads",
|
|
"transcribe_to_srt",
|
|
"write_csv",
|
|
"run_command",
|
|
"get_chapters",
|
|
"get_video_id_from_chat"
|
|
"twitch",
|
|
"youtube"
|
|
]
|