diff --git a/.cargo/config.toml b/.cargo/config.toml index 5db3158..c4bb6e0 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,2 @@ [build] -rustflags = ["-Clink-arg=-fuse-ld=mold", "-Ctarget-cpu=native"] +rustflags = ["-Clink-arg=-fuse-ld=lld", "-Ctarget-cpu=native"] diff --git a/Cargo.toml b/Cargo.toml index 94dd73b..53eef8f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,3 +20,14 @@ codegen-backend = "cranelift" lto = true codegen-units = 1 panic = "abort" +strip = "none" + +[profile.windows] +inherits = "release" +opt-level = "z" +debug = false +strip = true +lto = true +codegen-units = 1 +incremental = false +panic = "abort" diff --git a/src/main.rs b/src/main.rs index 30ef1b5..2430900 100644 --- a/src/main.rs +++ b/src/main.rs @@ -38,6 +38,7 @@ fn convert_file(f: &String, args: &Args) -> Result<(), Error> { let converted = records_to_string(csv)?; if args.export { let path = f.replace(".tsv", ".tex"); + println!("[Info] Writing to {}", path); let mut file = File::create(path)?; file.write_all(converted.as_bytes())?; } else { @@ -70,7 +71,7 @@ fn replace_all(arg: &str) -> String { let temp = arg .replace('🩸', "\\blood") - .replace('⚡', "\\jauge") + .replace('⚡', "\\gauge") .replace('&', "\\&"); let res = re.replace(&temp, |caps: &Captures| { format!("\\dd{{{}}}", caps[0].chars().count()) @@ -114,7 +115,7 @@ fn records_to_string(csv: Vec>) -> Result { // EXSANGUINATION PROGRESSIVE & 1 & Actif, (Béhémoth) & 4\blood\vfill 1\gauge & Ces attaques infligent aussi un saignement de 1 dégât sur 4 tours (chaque attaque viens ajouter un point au saignement total).\\ let mut buffer = BufWriter::new(Vec::new()); for (lvl, tier) in csv.iter().skip(1).enumerate() { - write!(buffer, "\\subsubsection{{Tier {}}}", lvl)?; + write!(buffer, "\\subsubsection{{Tier {}}}", lvl + 1)?; let open = r#"{\footnotesize \rowcolors{2}{gray!25}{white} \begin{tabularx}{\textwidth}{|p{0.17\linewidth\hyphenpenalty=9000}lp{0.13\linewidth}p{0.042\linewidth}X|} @@ -124,7 +125,7 @@ fn records_to_string(csv: Vec>) -> Result { for elem in tier { write!( buffer, - " {}&{}&{}&{}&{}&{}", + " {}&{}&{}&{}{}&{} \\\\", elem.technique, elem.niveau, elem.technique_type,