Compare commits

..

No commits in common. "e469f7593a60e87bc592ee53b0e8573583da6d08" and "76744cbe71b5f32aae6211c78b7fd379da051239" have entirely different histories.

4 changed files with 11 additions and 22 deletions

1
blocks.txt Normal file
View file

@ -0,0 +1 @@
example.com

2
mutes.txt Normal file
View file

@ -0,0 +1,2 @@
example.net
example.org

View file

@ -6,42 +6,30 @@ mod tests;
use std::path::PathBuf; use std::path::PathBuf;
use clap::Parser; use clap::Parser;
use log::error;
#[derive(Parser)] #[derive(Parser)]
#[command(version, about, long_about = None)] #[command(version, about, long_about = None)]
struct Cli { struct Cli {
/// Selects a custom config file /// Selects a custom config file (optional)
config: Option<PathBuf>, config: Option<PathBuf>,
/// Specifies files/directories for blocks /// Sets output directory (optional, defaults to current directory)
#[arg(short = 'B', long)] output_dir: Option<PathBuf>,
/// Specifies block files/directories
#[arg(short, long)]
block: Vec<PathBuf>, block: Vec<PathBuf>,
/// Specifies files/directories for silences /// Specifies silence files/directories
#[arg(short = 'M', long)]
mute: Vec<PathBuf>,
/// Specifies confidence in a source. Default = 100
#[arg(short, long)] #[arg(short, long)]
trust: Vec<u16>, mute: Vec<PathBuf>,
/// Sets output directory (optional, defaults to current directory)
#[arg(last = true)]
path: Option<PathBuf>,
// TODO more options // TODO more options
// TODO verbose mode // TODO verbose mode
} }
fn main() { fn main() {
env_logger::init();
let cli = Cli::parse(); let cli = Cli::parse();
if cli.block.is_empty() && cli.mute.is_empty() && cli.config.is_none() {
error!("No lists or configuration provided.");
}
// TODO argument parsing - IN PROGRESS // TODO argument parsing - IN PROGRESS
// TODO logging // TODO logging
} }

View file

@ -31,8 +31,6 @@ impl ModActionTrust {
} }
impl From<(u16, u16)> for ModActionTrust { impl From<(u16, u16)> for ModActionTrust {
/// Creates mod action weights from a tuple of two `u16` weights. Useful
/// mostly for testing.
fn from(value: (u16, u16)) -> Self { fn from(value: (u16, u16)) -> Self {
Self { Self {
block: value.0, block: value.0,