Now with windows support
This commit is contained in:
parent
e702393c0d
commit
b141d4ea5f
|
|
@ -1,2 +1,2 @@
|
|||
[build]
|
||||
rustflags = ["-Clink-arg=-fuse-ld=mold", "-Ctarget-cpu=native"]
|
||||
rustflags = ["-Clink-arg=-fuse-ld=lld", "-Ctarget-cpu=native"]
|
||||
|
|
|
|||
11
Cargo.toml
11
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"
|
||||
|
|
|
|||
|
|
@ -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<Vec<Record>>) -> Result<String, Error> {
|
|||
// 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<Vec<Record>>) -> Result<String, Error> {
|
|||
for elem in tier {
|
||||
write!(
|
||||
buffer,
|
||||
" {}&{}&{}&{}&{}&{}",
|
||||
" {}&{}&{}&{}{}&{} \\\\",
|
||||
elem.technique,
|
||||
elem.niveau,
|
||||
elem.technique_type,
|
||||
|
|
|
|||
Loading…
Reference in New Issue