aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-04-14 16:59:11 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-04-14 16:59:11 +0200
commit02b73cc7b23dff8797ee0c0fbbaa3368268cbf0f (patch)
treee1019ce190c3c1e52f3baa38a40a7d16dc0c056c /pkgs
parentmodules/nvim/plgs/lsp/openscad: Specify the autoCmd correctly (diff)
downloadnixos-config-02b73cc7b23dff8797ee0c0fbbaa3368268cbf0f.zip
pkgs/tskm/inputs: Auto-add a tag for the current date on file import
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/by-name/ts/tskm/src/interface/input/handle.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/by-name/ts/tskm/src/interface/input/handle.rs b/pkgs/by-name/ts/tskm/src/interface/input/handle.rs
index 76eea6dc..f9772f34 100644
--- a/pkgs/by-name/ts/tskm/src/interface/input/handle.rs
+++ b/pkgs/by-name/ts/tskm/src/interface/input/handle.rs
@@ -16,6 +16,7 @@ use std::{
use anyhow::{Context, Result};
use log::info;
+use taskchampion::chrono::Utc;
use crate::{browser::open_in_browser, cli::InputCommand, state::State};
@@ -52,6 +53,11 @@ pub fn handle(command: InputCommand, state: &mut State) -> Result<()> {
tag_set.insert(tag);
}
+ tag_set.insert(
+ Tag::new(format!("+{}", Utc::now().format("%Y-%m-%d")).as_str())
+ .expect("hardcoded"),
+ );
+
for line in file.lines().map(str::trim) {
if line.is_empty() {
continue;