summaryrefslogtreecommitdiff
path: root/local/bin/todo
blob: 58299cdbb10c95445bbc80757067ff4aa6a6b925 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

TODO_BASE='* TODO  '
JRNL="$STITCH_DIRECTORY/$(date +'%y-%m-%d.%H:%M.%S').org"
echo '* TODO  ' > /tmp/capture
kak /tmp/capture +1:8 -e "execute-keys i"
if grep -q '^\* TODO\s*$' /tmp/capture 
then 
   echo "Empty capture"
else 
   echo "Storing capture in $JRNL"
   cat /tmp/capture > $JRNL
fi