obsidian-tasks: import
This commit is contained in:
23
obsidian-tasks/obsidian-tasks.sh
Executable file
23
obsidian-tasks/obsidian-tasks.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/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
|
||||
}
|
||||
'
|
||||
Reference in New Issue
Block a user