<commit_before>//! # Bearer
//!
//! bearer is a command line utility to generate Authorization HTTP header
//! for bearer tokens. See https://tools.ietf.org/html/rfc6750
//!
//! bearer comes with a `--register` that will ask you the OAuth 2.0
//! client information to initialize the access and refresh tokens.
//!
//! Afterwhat it generate a header you can path to a curl request:
//!
//! ```
//! curl -H "$(bearer client_name)" "http://<oauth2 api>" | jq
//! ```
//!

#[macro_use]
extern crate log;
extern crate pretty_env_logger;

extern crate clap;
extern crate libc;
extern crate tilde_expand;
extern crate toml;
extern crate chrono;

extern crate serde;
#[macro_use]
extern crate serde_derive;

extern crate url;
extern crate curl;
extern crate serde_json;

use std::io::Write;
mod helpers;
mod config;
mod commands;
mod results;


fn main() {
    pretty_env_logger::init().unwrap();
    match commands::start() {
        Ok(()) => {
            debug!("Command bearer ended successfully");
        }
        Err(results::BearerError::ValueError(msg)) => {
            let _ = writeln!(&mut std::io::stderr(), "ERROR: {}", msg);
            std::process::exit(1);
        }
        Err(results::BearerError::IOError(err)) => {
            let _ = writeln!(&mut std::io::stderr(), "ERROR: {}", err);
            std::process::exit(1);
        }
        Err(err) => {
            let _ = writeln!(&mut std::io::stderr(), "ERROR: {:?}", err);
            std::process::exit(101);<commit_msg>Fix typo in logging message<commit_after>//! # Bearer
//!
//! bearer is a command line utility to generate Authorization HTTP header
//! for bearer tokens. See https://tools.ietf.org/html/rfc6750
//!
//! bearer comes with a `--register` that will ask you the OAuth 2.0
//! client information to initialize the access and refresh tokens.
//!
//! Afterwhat it generate a header you can path to a curl request:
//!
//! ```
//! curl -H "$(bearer client_name)" "http://<oauth2 api>" | jq
//! ```
//!

#[macro_use]
extern crate log;
extern crate pretty_env_logger;

extern crate clap;
extern crate libc;
extern crate tilde_expand;
extern crate toml;
extern crate chrono;

extern crate serde;
#[macro_use]
extern crate serde_derive;

extern crate url;
extern crate curl;
extern crate serde_json;

use std::io::Write;
mod helpers;
mod config;
mod commands;
mod results;


fn main() {
    pretty_env_logger::init().unwrap();
    match commands::start() {
        Ok(()) => {
            debug!("Command bearer ended succesfully");
        }
        Err(results::BearerError::ValueError(msg)) => {
            let _ = writeln!(&mut std::io::stderr(), "ERROR: {}", msg);
            std::process::exit(1);
        }
        Err(results::BearerError::IOError(err)) => {
            let _ = writeln!(&mut std::io::stderr(), "ERROR: {}", err);
            std::process::exit(1);
        }
        Err(err) => {
            let _ = writeln!(&mut std::io::stderr(), "ERROR: {:?}", err);
            std::process::exit(101);
{'fraction_non_alphanumeric': 0.16461179606797735, 'fraction_numerical': 0.007997334221926024, 'mean_word_length': 2.9973368841544605, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7502844', 'n_tokens_mistral': 986, 'n_tokens_neox': 925, 'n_words': 277}