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.
main
Brennen Bearnes 1 year 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
grep_logs="$(fragment-vimwiki-grep-logs "$1")"
calendar_datestamp="$(date --date="$date" '+%Y%m%d')"
calendar="{{{exec-raw calendar -t \"$calendar_datestamp\"
calendar="{{{exec-raw cd ~/notes && calendar -t \"$calendar_datestamp\" # calendar
}}}"
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
echo '== log =='
echo
echo "{{{exec-raw find ./vimwiki/log -name '${datestamp}*.wiki' | sort | xargs grep --with-filename '%title'"
echo "{{{exec-raw cd ~/notes && find ./vimwiki/log -name '${datestamp}*.wiki' | sort | xargs grep --with-filename '%title'"
echo '}}}'

Loading…
Cancel
Save