summaryrefslogtreecommitdiff
path: root/src/bin/sp-extract.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/sp-extract.rs')
-rw-r--r--src/bin/sp-extract.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/sp-extract.rs b/src/bin/sp-extract.rs
index cdd9fba..9be159f 100644
--- a/src/bin/sp-extract.rs
+++ b/src/bin/sp-extract.rs
@@ -6,6 +6,8 @@ use structopt::StructOpt;
use subplot::{DataFile, Document, Style, SubplotError};
+mod cli;
+
#[derive(Debug, StructOpt)]
#[structopt(name = "sp-meta", about = "Show Subplot document metadata.")]
struct Opt {
@@ -24,9 +26,7 @@ struct Opt {
fn main() -> Result<()> {
let opt = Opt::from_args();
- let basedir = subplot::get_basedir_from(&opt.filename)?;
- let style = Style::default();
- let doc = Document::from_file(&basedir, &opt.filename, style)?;
+ let doc = cli::load_document(&opt.filename, Style::default())?;
for filename in opt.embedded {
let file = get_embedded(&doc, &filename)?;