Importing Plain Text Files into Day One with Date CreatedSeptember 1, 2012
Prior to using Day One, I used nvALT coupled with iA Writer and other various Markdown editors to organize my notes. After deciding I wanted some more organization, security, syncing, and other features, I took the leap and switched to Day One. Importing all of my plain text files into Day One was rather annoying. Here are the steps I had to take (I also created a project on GitHub for anyone who’s interested in the exact code I used):
- Copy all of my notes into a new folder (extra precaution, didn’t want to mess with the originals, this later proved to be a good idea).
- Make an Automator workflow to run a TextSoap cleaner on all files in a directory.
- Write a TextSoap cleaner to convert my dailies markdown (iA Writer allowed for sloppier Markdown) to Day One markdown (this was a lot of trial and error as I would constantly find new things that needed to be changed).
- Create a shell script to change the timestamps on the new files back to the original timestamps (when you copy the files, they retain their original creation date, but after running the TextSoap cleaner, it changes to today).
- Create a shell script to import them all into Day One via the Day One command line interface.