diff --git a/crates/config/Cargo.toml b/crates/config/Cargo.toml index 5448a80..8c6042e 100644 --- a/crates/config/Cargo.toml +++ b/crates/config/Cargo.toml @@ -5,5 +5,5 @@ edition = "2024" [dependencies] clap = { version = "4.5.28", features = ["derive"] } -phf = { version = "0.11.3", features = ["macros"] } +phf = { version = "0.13.1", features = ["macros"] } serde = { version = "1.0.217", features = ["derive"] } diff --git a/crates/fast_class/Cargo.toml b/crates/fast_class/Cargo.toml index b11a1e0..258c4bc 100644 --- a/crates/fast_class/Cargo.toml +++ b/crates/fast_class/Cargo.toml @@ -4,4 +4,4 @@ version = "0.1.0" edition = "2024" [dependencies] -facet = "0.42.0" +facet = "0.46.0" diff --git a/crates/formatter/Cargo.toml b/crates/formatter/Cargo.toml index c4a0f90..026aeca 100644 --- a/crates/formatter/Cargo.toml +++ b/crates/formatter/Cargo.toml @@ -8,5 +8,5 @@ config = {path = "../config"} cli_parser = {path = "../cli_parser"} regex = "1.11.1" serde = { version = "1.0.217", features = ["derive", "alloc"] } -toml = "0.8.20" +toml = "1.1.2" anyhow = "1.0.95" diff --git a/crates/graphs/Cargo.toml b/crates/graphs/Cargo.toml index f9fa018..620bc88 100644 --- a/crates/graphs/Cargo.toml +++ b/crates/graphs/Cargo.toml @@ -7,8 +7,8 @@ edition = "2024" config = {path = "../config"} cli_parser = {path = "../cli_parser"} anyhow = "1.0.95" -charts-rs = "0.4.2" +charts-rs = { version = "0.4.2", features = ["image", "image-encoder"] } glob = "0.3.2" serde = { version = "1.0.217", features = ["derive", "alloc"] } csv = "1.3.1" -ron = "0.8.1" +ron = "0.12.1" diff --git a/crates/graphs/src/graphs.rs b/crates/graphs/src/graphs.rs index 5716193..b004954 100644 --- a/crates/graphs/src/graphs.rs +++ b/crates/graphs/src/graphs.rs @@ -4,7 +4,9 @@ //! //! - [`make_graphs`]: The main action dispatcher for graph generation and removal. -use charts_rs::{Box, Color, RadarChart, RadarIndicator, Series, get_or_try_init_fonts}; +use charts_rs::{ + Box, Color, RadarChart, RadarIndicator, Series, get_or_try_init_fonts, svg_to_png_with_size, +}; use cli_parser::Config; use config::graph::{FinalClassRadar, GraphConfig, GraphTargetType, LoadedClassRadar, RawRow}; use glob::glob; @@ -112,20 +114,25 @@ fn gen_graph(args: &GraphConfig) -> Result<()> { let mut r = RadarChart::new([graph].to_vec(), maxv.to_vec()); cfg.apply_to(&mut r); - f.write_all(r.svg().context("Converting to SVG")?.as_bytes())?; + println!("Writing to {}", path_svg); + let context = r.svg().context("Converting to SVG")?; + f.write_all(context.as_bytes())?; - let mut cmd = Command::new("convert"); - cmd.arg("--size") - .arg("800x600") - .arg(&path_svg) - .arg(path_png); - println!("[INFO] Using convert cli to convert to png"); - if let Err(e) = cmd.output() { - println!( - "[ERRR] An error has occured when converting the file {} to png \n {:#?}", - path_svg, e - ) - } + // let mut cmd = Command::new("convert"); + // cmd.arg("--size") + // .arg("800x600") + // .arg(&path_svg) + // .arg(path_png); + // println!("[INFO] Using convert cli to convert to png"); + // if let Err(e) = cmd.output() { + // println!( + // "[ERRR] An error has occured when converting the file {} to png \n {:#?}", + // path_svg, e + // ) + // } + let png = svg_to_png_with_size(&context, Some(980), Some(560)).context("Writing png")?; + let mut f = File::create(path_png)?; + f.write_all(&png).context("Writing png")?; } Ok(()) } @@ -290,15 +297,15 @@ impl MiniTheme { /// The default theme for out tool pub fn new() -> Self { Self { - font_family: "LMRoman8".to_string(), + font_family: "Latin Modern Roman".to_string(), margin: Box { - left: -10.0, + left: 140.0, top: 20.0, - right: 70.0, - bottom: 0.0, + right: 90.0, + bottom: 60.0, }, - width: 720.0, - height: 440.0, + width: 980.0, + height: 560.0, grid_stroke_color: Color { r: 77, g: 69, diff --git a/crates/make/Cargo.toml b/crates/make/Cargo.toml index 3d6aeb6..18d8596 100644 --- a/crates/make/Cargo.toml +++ b/crates/make/Cargo.toml @@ -7,12 +7,12 @@ edition = "2024" config = {path = "../config"} cli_parser = {path = "../cli_parser"} dynfmt = { version = "0.1.5", features = ["curly"] } -indicatif = { version = "0.17.11", features = ["rayon"] } -logos = "0.15.0" +indicatif = { version = "0.18.4", features = ["rayon"] } +logos = "0.16.1" tokio = "1.43.0" anyhow = "1.0.95" indexmap = "2.7.1" regex = "1.11.1" serde = { version = "1.0.217", features = ["derive", "alloc"] } -console = "0.15.10" -toml = "0.8.20" +console = "0.16.3" +toml = "1.1.2" diff --git a/crates/make/src/makepdf_structs.rs b/crates/make/src/makepdf_structs.rs index 3cb7684..f5bc669 100644 --- a/crates/make/src/makepdf_structs.rs +++ b/crates/make/src/makepdf_structs.rs @@ -229,11 +229,11 @@ pub(super) enum LineType { EnteringDocument(String), /// Info on the loading of a library - #[regex(r"Library \(\w+\)[^\n]+", |lex| split_by(":",&lex.slice()[8..]))] + #[regex(r"Library \(\w+\)[^\n]+", |lex| split_by(":",&lex.slice()[8..]), allow_greedy=true)] Library((String, String)), /// The warning generated by a package - #[regex(r"Package [A-z_-]+ Warning: [^\n]+", |lex| split_by(":",lex.slice()))] + #[regex(r"Package [A-z_-]+ Warning: [^\n]+", |lex| split_by(":",lex.slice()), allow_greedy=true)] PackageWarningPrs((String, String)), /// A package warning, with normal warning level @@ -243,7 +243,7 @@ pub(super) enum LineType { LowPackageWarning((String, String)), /// The warning context generated by a package - #[regex(r"\([A-z_-]+\) [^\n]+", |lex| split_by(")",&lex.slice()[1..]))] + #[regex(r"\([A-z_-]+\) [^\n]+", |lex| split_by(")",&lex.slice()[1..]), allow_greedy=true)] PackageContext((String, String)), /// Loading (Load something) diff --git a/crates/ravenous-tools/Cargo.toml b/crates/ravenous-tools/Cargo.toml index cd4faee..3e0b3c4 100644 --- a/crates/ravenous-tools/Cargo.toml +++ b/crates/ravenous-tools/Cargo.toml @@ -16,7 +16,7 @@ formatter = {path = "../formatter"} anyhow = "1.0.95" clap = { version = "4.5.28", features = ["derive"] } tokio = { version = "1.43.0", features = ["full"] } -toml = "0.8.20" +toml = "1.1.2" [package.metadata.cargo-machete] ignored = ["tokio"] diff --git a/crates/tablegen/Cargo.toml b/crates/tablegen/Cargo.toml index 88ded94..b9295fa 100644 --- a/crates/tablegen/Cargo.toml +++ b/crates/tablegen/Cargo.toml @@ -10,7 +10,7 @@ anyhow = "1.0.95" csv = "1.3.1" dynfmt = { version = "0.1.5", features = ["curly"] } glob = "0.3.2" -phf = { version = "0.11.3", features = ["macros"] } +phf = { version = "0.13.1", features = ["macros"] } regex = "1.11.1" regex_static = "0.1.1" serde = { version = "1.0.217", features = ["derive", "alloc"] }