1
0
mirror of https://github.com/shimunn/gitredditor.git synced 2023-11-17 18:42:43 +01:00

implemented thresholds

This commit is contained in:
shimunn
2019-05-08 12:00:44 +02:00
parent 5ead8f310d
commit a46aaff8b0
6 changed files with 49 additions and 14 deletions

View File

@@ -4,10 +4,16 @@ pub use structopt::StructOpt;
#[derive(StructOpt, Debug)]
#[structopt(name = "gitredditor")]
pub struct Opts {
#[structopt(short = "f", long = "fetch", default_value = "20")]
#[structopt(short = "f", long = "fetch", default_value = "20", env = "GITREDDITOR_CNT")]
pub fetch: usize,
#[structopt(short = "r", long = "redditor")]
#[structopt(short = "t", long = "threshold", default_value = "5", env = "GITREDDITOR_TH")]
pub threshold: u32,
#[structopt(short = "p", long = "threshold-percent", default_value = "5", env = "GITREDDITOR_THP")]
pub thresholdp: u8,
#[structopt(short = "r", long = "redditor", env = "GITREDDITOR_U")]
pub redditor: String,
#[structopt(parse(from_os_str))]