about summary refs log tree commit diff stats
path: root/pkgs/by-name/ts/tskm/src/interface/neorg/mod.rs
blob: dc5cdf19957e85d9dd0c69fdee17936ebfa8beea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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()))
    }
}