summaryrefslogtreecommitdiff
path: root/src/bin/subplot.rs
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2021-06-19 11:02:35 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2021-06-19 11:02:35 +0100
commit2d1e97a133302172d77e63802c63ba4786d788cd (patch)
tree1bc875d3a23404379a1735796ebe7dba674e356f /src/bin/subplot.rs
parentb670a457b01e79bac5d1c57276bb977a15a38d5b (diff)
downloadsubplot-2d1e97a133302172d77e63802c63ba4786d788cd.tar.gz
cli: Add flexibility in dot and plantuml locations
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'src/bin/subplot.rs')
-rw-r--r--src/bin/subplot.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/bin/subplot.rs b/src/bin/subplot.rs
index 47dc72b..867ffb2 100644
--- a/src/bin/subplot.rs
+++ b/src/bin/subplot.rs
@@ -5,7 +5,9 @@ use anyhow::Result;
use chrono::{Local, TimeZone};
use structopt::StructOpt;
-use subplot::{generate_test_program, resource, template_spec, DataFile, Document, Style};
+use subplot::{
+ generate_test_program, resource, template_spec, DataFile, Document, MarkupOpts, Style,
+};
use std::convert::TryFrom;
use std::ffi::OsString;
@@ -27,6 +29,9 @@ struct Toplevel {
resources: resource::ResourceOpts,
#[structopt(flatten)]
+ markup: MarkupOpts,
+
+ #[structopt(flatten)]
command: Cmd,
}
@@ -35,9 +40,10 @@ impl Toplevel {
self.command.run()
}
- fn handle_resources(&self) {
+ fn handle_special_args(&self) {
let doc_path = self.command.doc_path();
self.resources.handle(doc_path);
+ self.markup.handle();
}
}
@@ -408,7 +414,7 @@ fn main() {
let argparser = argparser.long_version(version.as_str());
let args = argparser.get_matches();
let args = Toplevel::from_clap(&args);
- args.handle_resources();
+ args.handle_special_args();
match args.run() {
Ok(_) => {}
Err(e) => {