diff options
author | metamuffin <metamuffin@disroot.org> | 2025-09-26 17:34:24 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-09-27 00:55:23 +0200 |
commit | cb434ae50fe7b0ad5df4b600da062623a272ba59 (patch) | |
tree | 71ed96fd72d5075199d42104e11b9491baf81e19 /server/tools/src/main.rs | |
parent | fd7c0cf155760353b877c1f1551e872e1aca0401 (diff) | |
download | hurrycurry-cb434ae50fe7b0ad5df4b600da062623a272ba59.tar hurrycurry-cb434ae50fe7b0ad5df4b600da062623a272ba59.tar.bz2 hurrycurry-cb434ae50fe7b0ad5df4b600da062623a272ba59.tar.zst |
diagram dot output
Diffstat (limited to 'server/tools/src/main.rs')
-rw-r--r-- | server/tools/src/main.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/server/tools/src/main.rs b/server/tools/src/main.rs index 2836325e..96ecf46a 100644 --- a/server/tools/src/main.rs +++ b/server/tools/src/main.rs @@ -18,6 +18,7 @@ pub mod book; pub mod book_html; +pub mod diagram_dot; pub mod diagram_layout; pub mod graph; pub mod graph_summary; @@ -26,8 +27,10 @@ pub mod recipe_diagram; use crate::{ book::{book, print_book}, book_html::render_html_book, + diagram_dot::diagram_dot, graph::graph, graph_summary::graph_summary, + recipe_diagram::recipe_diagram, }; use anyhow::Result; use clap::Parser; @@ -37,6 +40,7 @@ use hurrycurry_server::data::DataIndex; enum Action { Graph, GraphSummary, + GraphSingle { out: String }, Book, BookHtml, MapDemands { map: String }, @@ -48,6 +52,14 @@ fn main() -> Result<()> { match action { Action::Graph => graph()?, Action::GraphSummary => graph_summary()?, + Action::GraphSingle { out } => { + let mut index = DataIndex::default(); + index.reload()?; + let (data, serverdata, _) = index.generate("5star")?; + let diagram = recipe_diagram(&data, &serverdata, &[out])?; + let dot = diagram_dot(&data, &diagram)?; + println!("{dot}"); + } Action::Book => { let mut index = DataIndex::default(); index.reload()?; |