Skip to content

Instantly share code, notes, and snippets.

@thechinnster
Created April 15, 2013 16:38
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 thechinnster/5389423 to your computer and use it in GitHub Desktop.
Save thechinnster/5389423 to your computer and use it in GitHub Desktop.
Text File to Day One
#!/bin/bash
doneFile=~/Dropbox/Apps/Drafts/Journal.txt
if [[ -s $doneFile ]] ; then
echo -e "\n\n #done" >> $doneFile
/usr/local/bin/dayone new < $doneFile
rm $doneFile
touch $doneFile
fi ;
@thechinnster
Copy link
Author

Every day I add lines to a file to track what I've done that day. Then at the end of the day this script runs which imports the text from the file as an entry in Day One, deletes the file and then creates a new file with the same name ready for the next day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment