From a9db63802db2293ac4ee280394568b09f6feaa87 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sun, 6 Apr 2025 18:36:27 +0200 Subject: feat(pkgs/tskm/task): Use taskchampion instead of run_task --- pkgs/by-name/ts/tskm/src/interface/neorg/handle.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pkgs/by-name/ts/tskm/src/interface/neorg') diff --git a/pkgs/by-name/ts/tskm/src/interface/neorg/handle.rs b/pkgs/by-name/ts/tskm/src/interface/neorg/handle.rs index a9a46ee7..45e1f916 100644 --- a/pkgs/by-name/ts/tskm/src/interface/neorg/handle.rs +++ b/pkgs/by-name/ts/tskm/src/interface/neorg/handle.rs @@ -7,12 +7,12 @@ use std::{ use anyhow::{bail, Result}; -use crate::cli::NeorgCommand; +use crate::{cli::NeorgCommand, state::State}; -pub fn handle(command: NeorgCommand) -> Result<()> { +pub fn handle(command: NeorgCommand, state: &mut State) -> Result<()> { match command { NeorgCommand::Task { id } => { - let project = id.project()?; + let project = id.project(state)?; let path = dirs::data_local_dir() .expect("This should exists") .join("notes") @@ -36,7 +36,7 @@ pub fn handle(command: NeorgCommand) -> Result<()> { .args([ path.to_str().expect("Should be a utf-8 str"), "-c", - format!("/% {}", id.to_uuid()?).as_str(), + format!("/% {}", id.uuid()).as_str(), ]) .status()?; if !status.success() { @@ -71,7 +71,7 @@ pub fn handle(command: NeorgCommand) -> Result<()> { } { - id.annotate("[neorg data]")?; + id.mark_neorg_data(state)?; } } } -- cgit 1.4.1