Initial commit
This commit is contained in:
34
src/main.rs
Normal file
34
src/main.rs
Normal file
@@ -0,0 +1,34 @@
|
||||
mod cli;
|
||||
mod config;
|
||||
mod fsops;
|
||||
mod llm;
|
||||
mod media;
|
||||
mod metadata;
|
||||
mod output;
|
||||
mod parse;
|
||||
mod pipeline;
|
||||
mod report;
|
||||
mod utils;
|
||||
|
||||
use anyhow::Result;
|
||||
use clap::Parser;
|
||||
|
||||
use crate::cli::Cli;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
if std::env::args_os().len() == 1 {
|
||||
let path = config::init_default_config()?;
|
||||
eprintln!("Config file: {} (edit to set API keys and defaults)", path.display());
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let cli = Cli::parse();
|
||||
let settings = config::build_settings(&cli)?;
|
||||
|
||||
let report_format = settings.report_format.clone();
|
||||
let report_path = settings.report_path.clone();
|
||||
|
||||
let report = pipeline::run(settings)?;
|
||||
report.write(&report_format, report_path.as_deref())?;
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user