refi 3.0.0

Rename files in numberic order
Documentation
use clap::{crate_version, App, Arg, ArgSettings};

fn main() {
    let matches = App::new("refi")
        .version(crate_version!())
        .author("Miika Launiainen <miika.launiainen@gmail.com>")
        .about("refi is a command line tool to rename files in numberic order.")
        .arg(
            Arg::new("folder")
                .about("Path to the folder of files")
                .required(true),
        )
        .arg(
            Arg::new("logfile")
                .short('l')
                .long("logfile")
                .about("Save logfile [rename.log]"),
        )
        .arg(Arg::new("yes").short('y').about("Automatic yes to prompts"))
        .arg(
            Arg::new("nro")
                .short('n')
                .long("nro")
                .takes_value(true)
                .about("Define custom number to start counting from"),
        )
        .arg(
            Arg::new("zeroes")
                .short('z')
                .long("zeroes")
                .takes_value(true)
                .about("Define custom number of zeroes before number"),
        )
        .arg(
            Arg::new("prefix")
                .short('p')
                .long("prefix")
                .takes_value(true)
                .about("Define prefix"),
        )
        .arg(
            Arg::new("mode")
                .short('m')
                .long("mode")
                .takes_value(true)
                .possible_values(&["n", "f"])
                .about("Choose what renaming mode to use")
                .long_about("Choose what renaming mode to use.\nn: normal (default)\nf: fixing missing numbers\n"),
        )
        .arg(
            Arg::new("ordering")
                .short('o')
                .long("order")
                .takes_value(true)
                .possible_values(&["a", "z", "n", "o"])
                .about("Choose ordering for the files")
                .long_about("Choose ordering for the files.\na: A-Z (default)\nz: Z-A\nn: Newest to oldest\no: Oldest to newest\n"),
        )
        .arg(
            Arg::new("ignore")
                .long("ignore")
                .setting(ArgSettings::MultipleValues)
                .about("Give a list of missing numbers to ignore")
        )
        .get_matches();

    refi::rename(matches.into());
}