Open abusenet opened 3 years ago
Idea for --include
. --exclude
maybe reverse this skip all the chunks from the function result.
use arrayvec::ArrayVec;
use std::collections::BTreeSet;
let s = "1,5,7-9";
let mut set = BTreeSet::new();
for e in s.split(',') {
let a: ArrayVec<u64, 2> = e.split('-').map(|v| v.parse().unwrap()).collect();
match *a {
[a] => {
set.insert(a);
}
[a, b] => {
set.extend(a..=b);
}
_ => panic!()
}
}
set
Result is: {1,5,7,8,9}
Some times I just want to redownload 1 or 2 chunks. Using
--skip
works fine, but I have to monitor the progress to stoprpl
downloading the next chunks.Please add
--include N
and--exclude N
options to let the user choose the chunks to download.