diff --git a/README.md b/README.md index 7cf6e12..404fb0e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Solventum Image Metadata Tool +# Oliver Metadata Tool -Universal metadata processing tool for PDF, images, Office documents and video files. +Universal metadata creation and management tool for all file types. Create, import, and manage metadata from multiple sources with an intuitive web interface. ## Features diff --git a/src/config.py b/src/config.py index 2927805..0651f8a 100644 --- a/src/config.py +++ b/src/config.py @@ -1,15 +1,24 @@ -"""Configuration management for the metadata automation tool.""" +"""Configuration management for Oliver Metadata Tool.""" import os +import shutil +import logging from pathlib import Path from dotenv import load_dotenv # Load environment variables load_dotenv() +logger = logging.getLogger(__name__) + class Config: """Configuration class for managing settings.""" + # App Info + APP_NAME = "Oliver Metadata Tool" + APP_VERSION = "3.0.0" + APP_DESCRIPTION = "Universal metadata creation and management tool" + # Paths PROJECT_ROOT = Path(__file__).parent.parent OUTPUT_DIR = PROJECT_ROOT / 'output' @@ -28,6 +37,18 @@ class Config: # jpn=Japanese, kor=Korean OCR_LANGUAGES = os.getenv('OCR_LANGUAGES', 'eng+chi_sim+chi_tra+jpn+kor') + # AI Settings (for CLI and Web AI mode) + OPENAI_API_KEY = os.getenv('OPENAI_API_KEY') + AI_MODEL = os.getenv('AI_MODEL', 'gpt-4o-mini') # Better than gpt-3.5-turbo + MAX_TOKENS = int(os.getenv('MAX_TOKENS', '500')) + TEMPERATURE = float(os.getenv('TEMPERATURE', '0.5')) # 0.5 better for factual content + MAX_TEXT_LENGTH = int(os.getenv('MAX_TEXT_LENGTH', '4000')) + + # API Rate Limiting & Retry (from open source analysis) + API_TIMEOUT = int(os.getenv('API_TIMEOUT', '30')) + API_MAX_RETRIES = int(os.getenv('API_MAX_RETRIES', '3')) + API_RETRY_DELAY = float(os.getenv('API_RETRY_DELAY', '1.0')) # exponential backoff multiplier + @classmethod def ensure_directories(cls): """Ensure required directories exist.""" @@ -35,5 +56,15 @@ class Config: cls.BACKUP_DIR.mkdir(exist_ok=True) cls.REPORTS_DIR.mkdir(exist_ok=True) + @classmethod + def check_exiftool(cls): + """Check if ExifTool is installed.""" + exiftool_path = shutil.which('exiftool') + if not exiftool_path: + logger.warning("⚠️ ExifTool not found. Install with: brew install exiftool (macOS) or apt-get install libimage-exiftool-perl (Linux)") + return False + logger.info(f"✓ ExifTool found at {exiftool_path}") + return True + # Ensure directories on import Config.ensure_directories() diff --git a/templates/index.html b/templates/index.html index bbcb2a9..569b55a 100644 --- a/templates/index.html +++ b/templates/index.html @@ -3,7 +3,7 @@ - Universal Metadata Tool + Oliver Metadata Tool