textract 0.1.0

Rust library to extract text from various types of files.
Documentation
mod extractors;
use textract;
use std::{env, process::exit};
fn main() {  
    let args:Vec<String> = env::args().collect();
    if args.len() == 1 {
        eprint!("Error: Require atleast 1 argument!");
        help();
        exit(1);
    }
    let mut file_path:&String = &args[1];
    let mut extension:Option<&str> = None;
    if args.len() >= 3 {
        file_path = &args[1];
        extension = Some(&args[2]);
    }

    let content = textract::extract(file_path, extension).unwrap();
    println!("{}",content);


}

fn help() {
    let help_message = "
    Usage: 
        textract FilePath Extension

    Parameter:
        filepath: [require] The path of file from where text will be extract.
        extension: [optional] Extension of file. if not supplied, textract will detect it. 
        ";
    println!("{}",help_message);
}