fediloom/src/main.rs

51 lines
1.1 KiB
Rust

// src/main.rs
mod manip;
mod tests;
use std::path::PathBuf;
use clap::Parser;
use log::error;
#[derive(Parser)]
#[command(version, about, long_about = None)]
struct Cli {
/// Selects a custom config file
config: Option<PathBuf>,
/// Specifies files/directories for blocks
#[arg(short = 'B', long)]
block: Vec<PathBuf>,
/// Specifies files/directories for silences
#[arg(short = 'M', long)]
mute: Vec<PathBuf>,
/// Specifies confidence in a source. Default = 100
#[arg(short, long)]
trust: Vec<u16>,
/// Sets output directory (optional, defaults to current directory)
#[arg(last = true)]
path: Option<PathBuf>,
// TODO more options
// TODO verbose mode
}
fn main() {
env_logger::init(); // TODO add more logging
let cli = Cli::parse();
if cli.block.is_empty() && cli.mute.is_empty() && cli.config.is_none() {
error!("No lists or configuration provided.");
}
// TODO parse config file if one is provided
// TODO read modsources from files
// TODO combine modsources into modmap
// TODO write modmap to files
}