diff options
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()?; |