diff options
Diffstat (limited to 'src/bin/cli/mod.rs')
-rw-r--r-- | src/bin/cli/mod.rs | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/bin/cli/mod.rs b/src/bin/cli/mod.rs index c53da0f..84bda10 100644 --- a/src/bin/cli/mod.rs +++ b/src/bin/cli/mod.rs @@ -11,50 +11,6 @@ use std::str::FromStr; use subplot::{DataFile, Document, Style, SubplotError}; use tracing::{event, instrument, Level}; -#[instrument(level = "trace")] -pub fn load_document<P>(filename: P, style: Style) -> Result<Document> -where - P: AsRef<Path> + Debug, -{ - let filename = filename.as_ref(); - let base_path = subplot::get_basedir_from(filename); - event!( - Level::TRACE, - ?filename, - ?base_path, - "Loading document based at `{}` called `{}` with {:?}", - base_path.display(), - filename.display(), - style - ); - let doc = Document::from_file(&base_path, filename, style)?; - event!(Level::TRACE, "Loaded doc from file OK"); - - Ok(doc) -} - -#[instrument(level = "trace")] -pub fn load_document_with_pullmark<P>(filename: P, style: Style) -> Result<Document> -where - P: AsRef<Path> + Debug, -{ - let filename = filename.as_ref(); - let base_path = subplot::get_basedir_from(filename); - event!( - Level::TRACE, - ?filename, - ?base_path, - "Loading document based at `{}` called `{}` with {:?} using pullmark-cmark", - base_path.display(), - filename.display(), - style - ); - let doc = Document::from_file_with_pullmark(&base_path, filename, style)?; - event!(Level::TRACE, "Loaded doc from file OK"); - - Ok(doc) -} - pub fn extract_file<'a>(doc: &'a Document, filename: &str) -> Result<&'a DataFile> { for file in doc.files() { if file.filename() == filename { |