1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
//! Application to run OCR on a subtitles image format (like `VobSub`)
use anyhow::Context as _;
use clap::Parser as _;
use log::LevelFilter;
use subtile_ocr::{run, Opt};
fn main() -> anyhow::Result<()> {
simple_logger::SimpleLogger::new()
.without_timestamps()
.with_level(LevelFilter::Warn)
.env()
.init()
.unwrap();
let opt = Opt::parse();
let res = run(&opt).with_context(|| {
format!(
"Could not convert '{}' to 'srt'.",
opt.input.clone().display()
)
});
res
}
|