diff --git a/src/config.rs b/src/config.rs new file mode 100644 index 0000000..c443933 --- /dev/null +++ b/src/config.rs @@ -0,0 +1,39 @@ +//! Configuration module +//! +//! Command line arguments and runtime configuration + +use anyhow::Result; +use clap::Parser; +use std::path::PathBuf; + +#[derive(Parser, Debug)] +#[command(name = "momentry")] +#[command(about = "MoMentry Playground - Unified media player with overlays")] +pub struct Config { + #[arg(short = 'v', long = "video", help = "Video file path")] + pub video: Option, + + #[arg(short = 'a', long = "asr", help = "ASR JSON file path")] + pub asr: Option, + + #[arg(short = 'y', long = "yolo", help = "YOLO JSON file path")] + pub yolo: Option, + + #[arg(short = 'w', long = "width", default_value = "1280", help = "Window width")] + pub width: u32, + + #[arg(short = 'h', long = "height", default_value = "720", help = "Window height")] + pub height: u32, + + #[arg(long = "fullscreen", help = "Start in fullscreen mode")] + pub fullscreen: bool, + + #[arg(long = "locale", default_value = "en", help = "UI language (en, zh-TW, etc.)")] + pub locale: String, +} + +impl Config { + pub fn load() -> Result { + Ok(Config::parse()) + } +}