summaryrefslogtreecommitdiff
path: root/local/bin/todo
blob: 247fc58ec3280c4c9e9831b3d2a7f5baa780d33e (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
$EDITOR /tmp/capture +1
if grep -q '^\* TODO\s*$' /tmp/capture 
then 
   echo "Empty capture"
else 
   echo "Storing capture in $JRNL"
   cat /tmp/capture > $JRNL
fi