//! CLI Functionality abstractions use anyhow::Result; use subplot::{Document, Style}; use std::path::Path; pub fn load_document>(filename: P, style: Style) -> Result { let filename = filename.as_ref(); let base_path = subplot::get_basedir_from(filename)?; let doc = Document::from_file(&base_path, filename, style)?; Ok(doc) }