Dotfiles, utilities, and other apparatus.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

18 lines
561 B

#!/bin/sh
if [ ! -z "$1" ]; then
# Take the basename of the file passed in, i.e. something like
# /home/brennen/notes/vimwiki/diary/2019-01-01.wiki, slice off the extension,
# and treat it as a seed date:
date="$(basename -s .wiki "$1")"
date="$(basename -s .md "$date")"
datestamp="$(date --date="$date" -I)"
else
# No filename given, nothing to work with, just use today:
datestamp="$(date -I)"
fi
echo '== log =='
echo
echo "{{{exec-raw find ./vimwiki/log -name '${datestamp}*.wiki' | sort | xargs grep --with-filename '%title'"
echo '}}}'