use cli_utils::{StreamIdent, path_buf::PathBuf};
use serde::{Deserialize, Serialize};
use wildmatch::WildMatch;
use crate::result;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Extractor {
pub markup_files: Vec<PathBuf>,
pub links: bool,
pub anchors: bool,
pub ignore_links: Vec<WildMatch>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Tool {
pub extractor: Extractor,
pub links: Option<StreamIdent>,
pub anchors: Option<StreamIdent>,
pub result_format: result::Type,
pub result_extended: bool,
pub result_flush: bool,
}
impl Default for Extractor {
fn default() -> Self {
Self {
markup_files: Vec::default(),
links: true,
anchors: false,
ignore_links: Vec::default(),
}
}
}
impl Default for Tool {
fn default() -> Self {
Self {
extractor: Extractor::default(),
links: Some(StreamIdent::StdOut),
anchors: None,
result_format: result::Type::default(),
result_extended: false,
result_flush: false,
}
}
}