about summary refs log tree commit diff stats
path: root/pkgs/by-name/ts/tskm/src/interface/neorg/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/ts/tskm/src/interface/neorg/mod.rs')
-rw-r--r--pkgs/by-name/ts/tskm/src/interface/neorg/mod.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/pkgs/by-name/ts/tskm/src/interface/neorg/mod.rs b/pkgs/by-name/ts/tskm/src/interface/neorg/mod.rs
new file mode 100644
index 00000000..dc5cdf19
--- /dev/null
+++ b/pkgs/by-name/ts/tskm/src/interface/neorg/mod.rs
@@ -0,0 +1,18 @@
+use std::path::PathBuf;
+
+use anyhow::Result;
+
+use crate::task::{run_task, Project};
+
+pub mod handle;
+pub use handle::handle;
+
+impl Project {
+    pub(super) fn get_neorg_path(&self) -> Result<PathBuf> {
+        let project_path = run_task(&[
+            "_get",
+            format!("rc.context.{}.rc.neorg_path", self.to_context_display()).as_str(),
+        ])?;
+        Ok(PathBuf::from(project_path.as_str()))
+    }
+}