cleand and with-nth

This commit is contained in:
2025-06-05 20:05:58 +02:00
parent 6973fb9f04
commit aaf3c56565
4 changed files with 22 additions and 28 deletions

View File

@@ -8,12 +8,13 @@ BEGIN {
CYAN = "\033[1;36m";
FAINT = "\033[2m";
OFF = "\033[m";
OFS = "|"
}
/^[0-7] 00:00 -- 00:00/ { dayline = dayline " " c(); next }
/^[0-7] 00:00 -- / { dayline = dayline " <-|" $4 " " c(); next }
/^[0-7] [0-9]{2}:[0-9]{2} -- 00:00/ { dayline = dayline " " $2 "|-> " c(); next }
/^[0-7] [0-9]{2}:[0-9]{2} -- [0-9]{2}:[0-9]{2}/ { dayline = dayline " " $2 " - " $4 " " c(); next }
/^[0-7]$/ && dayline { print dayline " ;" startofweek " +" $0 " days"; }
/^[0-7]$/ && dayline { print "+", startofweek " +" $0 " days", "", dayline; }
/^[0-7]$/ {
cmd = "date -d '" startofweek " +" $0 " days' +\"%a %e %b %Y\"";
cmd | getline dayline;