fr
This commit is contained in:
parent
24bab0fb18
commit
2a3fcd5820
2 changed files with 16 additions and 10 deletions
|
@ -1,3 +1,3 @@
|
||||||
fn_params_layout = "Compressed"
|
fn_params_layout = "Compressed"
|
||||||
attr_fn_like_width = 120
|
attr_fn_like_width = 140
|
||||||
max_width = 140
|
max_width = 160
|
22
src/main.rs
22
src/main.rs
|
@ -1,21 +1,20 @@
|
||||||
#![allow(clippy::single_match)]
|
#![allow(clippy::single_match)]
|
||||||
#![allow(non_camel_case_types, non_snake_case)]
|
#![allow(non_camel_case_types, non_snake_case)]
|
||||||
|
|
||||||
use idmangler_lib::{encoding::string::encode_string, types::EncodingVersion};
|
|
||||||
|
|
||||||
use std::{collections::HashMap, env, fs, io, path::PathBuf};
|
|
||||||
|
|
||||||
mod encode;
|
mod encode;
|
||||||
mod errorfr;
|
mod errorfr;
|
||||||
mod jsondl;
|
mod jsondl;
|
||||||
mod jsonstruct;
|
mod jsonstruct;
|
||||||
mod gearjson;
|
mod gearjson;
|
||||||
|
use idmangler_lib::{encoding::string::encode_string, types::EncodingVersion};
|
||||||
|
use std::{collections::HashMap, env, fs, io, path::PathBuf};
|
||||||
|
use clap::Parser;
|
||||||
|
use reqwest::Url;
|
||||||
use crate::errorfr::Errorfr;
|
use crate::errorfr::Errorfr;
|
||||||
use crate::jsondl::*;
|
use crate::jsondl::*;
|
||||||
use crate::jsonstruct::*;
|
use crate::jsonstruct::*;
|
||||||
use clap::Parser;
|
|
||||||
use reqwest::Url;
|
|
||||||
|
|
||||||
#[derive(Parser, Debug, Clone)]
|
#[derive(Parser, Debug, Clone)]
|
||||||
#[command(version, about, long_about = None, arg_required_else_help(true))]
|
#[command(version, about, long_about = None, arg_required_else_help(true))]
|
||||||
|
@ -96,7 +95,7 @@ fn main() {
|
||||||
|
|
||||||
// ENCODE: A Lot Of Stuff
|
// ENCODE: A Lot Of Stuff
|
||||||
// Also print any mapped errors
|
// Also print any mapped errors
|
||||||
let cooking = cook(&mut out, &debug_mode, ver, &loaded_config_borrow, loaded_idkeys, loaded_shinystats);
|
let cooking = cook(&mut out, &debug_mode, ver, &mut loaded_config_borrow, loaded_idkeys, loaded_shinystats);
|
||||||
if let Err(e) = cooking {
|
if let Err(e) = cooking {
|
||||||
println!("{}", e); // print error if there is an error
|
println!("{}", e); // print error if there is an error
|
||||||
} else {
|
} else {
|
||||||
|
@ -116,7 +115,7 @@ fn main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn cook(
|
fn cook(
|
||||||
out: &mut Vec<u8>, debug_mode: &bool, ver: EncodingVersion, json_config: &Jsonconfig, idsmap: HashMap<String, u8>,
|
out: &mut Vec<u8>, debug_mode: &bool, ver: EncodingVersion, json_config: &mut Jsonconfig, idsmap: HashMap<String, u8>,
|
||||||
json_shiny: Vec<Shinystruct>,
|
json_shiny: Vec<Shinystruct>,
|
||||||
) -> Result<String, Errorfr> {
|
) -> Result<String, Errorfr> {
|
||||||
let mut fr_params = FuncParams {
|
let mut fr_params = FuncParams {
|
||||||
|
@ -237,3 +236,10 @@ fn cook(
|
||||||
|
|
||||||
Ok(final_string)
|
Ok(final_string)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn cook_perfect(
|
||||||
|
out: &mut Vec<u8>, debug_mode: &bool, ver: EncodingVersion, json_config: &Jsonconfig, idsmap: HashMap<String, u8>,
|
||||||
|
json_shiny: Vec<Shinystruct>,
|
||||||
|
) -> Result<String, Errorfr> {
|
||||||
|
Ok("fr".parse().unwrap())
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue