blob: f46893cb0a593d8678bd63c59d5055a7705cb63e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/bin/sh
JRNL="$STITCH_DIRECTORY/$(date +'%y-%m-%d.%H:%M.%S').org"
echo '* :journal:' > /tmp/capture
kak /tmp/capture +1:3 -e "execute-keys i"
if grep -q '^\*\s*:journal:' /tmp/capture
then
echo "Empty capture; ignoring"
else
echo "Storing capture in $JRNL"
cat /tmp/capture > $JRNL
fi
|