Skip to content

Instantly share code, notes, and snippets.

@larryhynes
Created December 16, 2013 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larryhynes/7993559 to your computer and use it in GitHub Desktop.
Save larryhynes/7993559 to your computer and use it in GitHub Desktop.
#!/bin/bash
# http://larryhynes.net/2013/12/launchbar-to-taskpaper.html
# Important disclaimer: I have no idea what I’m doing
TODOFILE=/Users/larry/todo.taskpaper
TEMPTODO=`basename $0`
LINE=1
TMPFILE=`mktemp /tmp/${TEMPTODO}.XXXXXX` || exit 1
printf "$1" | sed 's/^/ - /' | unexpand -t4 > $TMPFILE || exit 1
ed -s $TODOFILE <<EOF
${LINE}r $TMPFILE
w
EOF
rm $TMPFILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment