For the last year or so I've been tying to keep a journal of observations about my kids, such as the milestones they're achieving and all the cute things they say and do.  You know, things like:

"4/20/2012: Drew recited PI to 37 digits today.  I'm really proud of him."

"4/21/2012: A college recruiter was looking at Mason today.  They said they've never scouted a 2 year old before but they think he has potential to win the Heisman and offered us full scholarship on the spot."

I know there's an abundance of software specifically made for this sort of journaling, but I've been a little nervous about using proprietary formats.  I keep thinking back to some resume creating software I bought 15 years ago.   Sure, it made nice resumes, but when the software got a little old and I didn't want to use it anymore I realized I couldn't open my files in a text editor like Word. 

So, If I want my kid journal to stand the test of time, I want it to be in the most basic format possible.  I want to be able to add entries from anywhere and at any time.  Because of this I decided to just make  single .txt file for each of my kids.  The really cool thing is i can keep this file in my Dropboxfolder and access it from a text editor on my computer or from an iPhone app like Elements.

However, I find that I still don't write as much as I'd like to.  I find writing on the iPhone and iPad to be a little awkward, and I'm sometimes too lazy to even open a text document to simply write a couple sentences.  Even worse, I spend a big chunk of my day using a work PC where I don't have the ability to use Dropbox.

A thought struck me: What if I could use email to write journal entries?  Whether I'm at work or at home I always have a browser window open to Gmail.  I opened up the mail app on my Mac and made a rule like this:


 I'm essentially giving the mail app these instructions: If you get an email from me and the subject is "kid1.txt", put it in my "Family" folder, mark it as "read", and then run an applescript.

The Applescript is as follows:


using terms from application "Mail"
    on perform mail action with messages theMessages for rule theRule
        tell application "Mail"
            repeat with theMessage in theMessages
                set theBody to content of theMessage as rich text
                set theSubject to subject of theMessage as rich text
                my executeScript(theBody, theSubject)
            end repeat
        end tell
    end perform mail action with messages
end using terms from
on executeScript(theText, theFile)
    set m to month of (current date)
    set d to day of (current date)
    set y to year of (current date)
    set theshortdate to m & " " & d & "," & y as string
    set the_file to ("/Users/icozip/Dropbox/Elements/journals/") & theFile
    -- write the file
    set openFile to open for access the_file with write permission
    write return to openFile starting at eof
    write return to openFile starting at eof
    write theshortdate to openFile starting at eof
    write return to openFile starting at eof
    write theText to openFile starting at eof
    close access openFile
end executeScript


As much programming as I've done, and as simple as Applescript is supposed to be, I'm still not very comfortable with it.  I cobbled this together from a bunch of other scripts that I found on the web.  It basically says

  1. Receive an email
  2. Extract the subject (which in this case will be "kid1.txt") and the content
  3. Append the date and the content of the email to the end of the file named "kid1.txt" in my dropbox folder

Now, when my kids say something cute in the car on the way to daycare, I can go to work, log into my email account, and add an entry to my kid blog by typing a short email.

The cool thing is I can do this with as many files as I like. For example, I could make a file called "kid2.txt" and, if I use this as my subject line, it'll append text to that file.

The other cool thing is that I get even more redundancy.  Now, not only is my text file on my Mac, in the cloud in Dropbox, backed up at Carbonite, but these emails will also remain in my Gmail account.

AuthorTodd Zarwell