From 02b73cc7b23dff8797ee0c0fbbaa3368268cbf0f Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Tue, 14 Apr 2026 16:59:11 +0200 Subject: pkgs/tskm/inputs: Auto-add a tag for the current date on file import --- pkgs/by-name/ts/tskm/src/interface/input/handle.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pkgs/by-name/ts/tskm/src') 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; -- cgit 1.4.1