diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-04-14 16:59:11 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-04-14 16:59:11 +0200 |
| commit | 02b73cc7b23dff8797ee0c0fbbaa3368268cbf0f (patch) | |
| tree | e1019ce190c3c1e52f3baa38a40a7d16dc0c056c | |
| parent | modules/nvim/plgs/lsp/openscad: Specify the autoCmd correctly (diff) | |
| download | nixos-config-02b73cc7b23dff8797ee0c0fbbaa3368268cbf0f.zip | |
pkgs/tskm/inputs: Auto-add a tag for the current date on file import
| -rw-r--r-- | pkgs/by-name/ts/tskm/src/interface/input/handle.rs | 6 |
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; |
