Files
to-hen/obsidian-tasks/obsidian-tasks.sh

24 lines
353 B
Bash
Raw Normal View History

2026-03-14 07:24:15 +01:00
#!/bin/sh
VAULT=~/cloud/syncthing/obsidian
rg --no-filename '^\s*- \[ ]' "$VAULT" \
| awk '
BEGIN {
# initialize "last-tag"
# initialize tags assoc array
}
{
# find out tag
# remove tag from task text
# add task text to assoc array
# save last-tag
}
/^\s+/ {
# save under last-tag in assoc array if no tag
}
END {
# group by tag
}
'