1mod config;
2mod i18n;
3mod remove_xml_tags;
4
5#[cfg(feature = "cli")]
6pub mod cli;
7#[cfg(feature = "gui")]
8pub mod gui;
9
10use std::{error::Error, result};
11
12pub type Result<T> = result::Result<T, Box<dyn Error>>;
13
14pub use config::{
15 Config,
16 input::{Input, InputFile, InputFileType},
17 output::Output,
18 tags::Tags,
19};
20pub use i18n::{Lang, Msg};
21pub use remove_xml_tags::remove_xml_tags;
22
23fn log_prefix_root(level: log::Level) -> &'static str {
24 use log::Level;
25 let msg = match level {
26 Level::Error => Msg::Error,
27 Level::Warn => Msg::Warning,
28 Level::Debug => Msg::Debug,
29 Level::Trace => Msg::Trace,
30 _ => return "",
31 };
32 msg.as_str()
33}