From 9bdcf860e654d774712f1aa96ef6f7c959ee44aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kry=C5=A1tof=20Pe=C5=A1ek=20=28Kof=29?= Date: Wed, 4 Nov 2026 14:45:14 +0100 Subject: [PATCH] feat(imp2ics): add RFC 5545 DTEND, line folding, CSV export and deduplication --- gensign | 3 +-- now | 15 ++++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/gensign b/gensign index a7fa7c1..ce322f4 100755 --- a/gensign +++ b/gensign @@ -1,7 +1,6 @@ #!/bin/bash #echo "Kryštof Pešek" > /home/kof/.signature #echo "https://k0f.github.io" >> /home/kof/.signature -#echo "https://k0f.github.io" >> /home/kof/.signature #echo "-----------------------------------------" >> /home/kof/.signature #echo Moon phase : `/home/kof/bin/moonphase` >> /home/kof/.signature #echo Metric time: `/home/kof/bin/metriclock` >> /home/kof/.signature @@ -10,7 +9,7 @@ while true; do { echo "Kryštof Pešek" - echo "https://k0f.github.io" + #echo "https://k0f.github.io" echo "-----------------------------------------" echo "Moon phase : $(/home/kof/bin/moonphase)" #echo "Metric time : $(/home/kof/bin/metriclock)" diff --git a/now b/now index 75915d6..fc65ef8 100755 --- a/now +++ b/now @@ -1,10 +1,15 @@ #!/bin/bash -# Check if the first argument starts with [ and ends with ] -if [[ "$1" =~ ^\[.*\]$ ]]; then - CATEGORY="${1^^}" # Uppercase the tag - shift # Remove the category from the argument list - ARGS="$*" # The rest of the message +# Check if category tag is provided, e.g. [TAG] or "[TAG] message" +if [[ "$1" =~ ^\[([^]]+)\][[:space:]]*(.*)$ ]]; then + CATEGORY="${BASH_REMATCH[1]^^}" + REST="${BASH_REMATCH[2]}" + shift + if [ -n "$REST" ]; then + ARGS="$REST${*:+ }$*" + else + ARGS="$*" + fi else CATEGORY="GENERAL" ARGS="$*"