feat(imp2ics): add RFC 5545 DTEND, line folding, CSV export and deduplication

This commit is contained in:
2026-11-04 14:45:14 +01:00
parent d98abbb99d
commit 9bdcf860e6
2 changed files with 11 additions and 7 deletions
+1 -2
View File
@@ -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)"
+10 -5
View File
@@ -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="$*"