Browse Source

vimwiki diary: better log grepping & calendar fragments

The calendar one will get the entry syntax-highlighted correctly (it seems
to pick a syntax based on the last string).

The log one will work from any directory.
Brennen Bearnes 1 month ago
parent
commit
297e850b0e
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      home/bin/fragment-vimwiki-diary
  2. 1
    1
      home/bin/fragment-vimwiki-grep-logs

+ 1
- 1
home/bin/fragment-vimwiki-diary View File

@@ -18,7 +18,7 @@ fi
18 18
 grep_logs="$(fragment-vimwiki-grep-logs "$1")"
19 19
 
20 20
 calendar_datestamp="$(date --date="$date" '+%Y%m%d')"
21
-calendar="{{{exec-raw calendar -t \"$calendar_datestamp\"
21
+calendar="{{{exec-raw cd ~/notes && calendar -t \"$calendar_datestamp\" # calendar
22 22
 }}}"
23 23
 
24 24
 printf '= %s =\n\n%s\n\n== calendar ==\n\n%s' "$datestamp" "$grep_logs" "$calendar"

+ 1
- 1
home/bin/fragment-vimwiki-grep-logs View File

@@ -14,5 +14,5 @@ fi
14 14
 
15 15
 echo '== log =='
16 16
 echo
17
-echo "{{{exec-raw find ./vimwiki/log -name '${datestamp}*.wiki' | sort | xargs grep --with-filename '%title'"
17
+echo "{{{exec-raw cd ~/notes && find ./vimwiki/log -name '${datestamp}*.wiki' | sort | xargs grep --with-filename '%title'"
18 18
 echo '}}}'

Loading…
Cancel
Save