Building on yesterday's post on an improved template system for Evernote I'd like to share with you how I use a variation on this system to create a daily journal template.
Several years ago I got fed up with getting to the end of a day and wondering where my day had gone and what I'd really achieved. Ticked off to-do lists only ever told a fraction of the story so I began to keep a daily journal. This has taken a variety of forms but now it lives in Evernote. Each day as I do things I log it. Five seconds logging anything from phone calls and e-mails to issues resolved and meetings attended. This lets me keep track of things from a day to day point of view (making me feel better about what I've achieved) and it also helps me pull together reports on what I and my team have been doing or even for my formal reviews. Journalling in Evernote keeps everything at my fingertips.
From that you can probably guess that I really like to have things just so. This includes the format of my journal. So that I can keep things up to date on my iPod touch and my PC I simply have one row per item (I gave up on bullet points as the iPod doesn't support editing these (yet)). I have the note tagged as "Journal" and currently I keep it in an Evernote notebook also called "Journal". So this all seems pretty straight forward and could easily be accomplished using the system described in my earlier post. The issue for me is that the title of each note is the date it is the journal for.
Sometimes I might create several days journals on the same day retrospectively (e.g. after being off ill or on a course) and so having the date in the title is really helpful in sorting as the creation and modified dates don't necessarily relate to the date of the activities. I also have the date in the format "yyyy-mm-dd" to support the option to sort.
So this means that in order to create a template to create a journal note for 'today', it would need to introduce some dynamically generated content in the form of the date.
For any keen scripters out there, the answer and principles are probably quite obvious and you could effectively write a script to dynamically populate the note with information in any number of ways. Since this is just dealing with the current date I was actually able to just get away with a few DOS commands in a batch file as shown below.
@echo off REM Initialise set ENscriptLocation="C:\Data\Applications\Evernote 3.5\ENScript.exe" set EvernoteDatabaseLocation="C:\Data\Evernote Data\Databases\evernotedatabase.exb" set FilePart1="C:\Data\Evernote Script\journal part 1.txt" set FilePart2="C:\Data\Evernote Script\journal part 2.txt" set WorkingFile="C:\Data\Evernote Script\journal.enex" set JournalNotebook="Journal" REM Build template to import type %FilePart1% > %WorkingFile% echo %date:~6,4%-%date:~3,2%-%date:~0,2% >> %WorkingFile% type %FilePart2% >> %WorkingFile% REM Create the journal from the template %ENscriptLocation% importNotes /s %WorkingFile% /n %JournalNotebook% /d %EvernoteDatabaseLocation% REM Clear up and close del %WorkingFile% set ENscriptLocation= set EvernoteDatabaseLocation= set JournalNotebook= set FilePart1= set FilePart2= set WorkingFile= cls cls exitThe script is relatively straight forward. It begins by setting several variables which indicate where to files - the ENSCRIPT executable and the Evernote database. This is followed by the location of three further files.
The first two of these are the static parts of the note - in this case the first file contains everything before the note's title and the second everything after the note's title. The content of these two files can be seen below. The third file is just a file used temporarily to build the note to be imported into Evernote.
The last variable is simply the name of the notebook I want the Journal note to appear in.
With the variables set the next section concatenates the pre-title note content with the date in the desired format and the post-title note content. These are all output into the file to be imported.
The next step is the actual import of the generated note into Evernote and once that has been done, the script removes the generated note file, clears out the variables and closes.
In case you are wondering what the content of the pre-title and post-title files are, the contents are shown below.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE en-export SYSTEM "http://xml.evernote.com/pub/evernote-export.dtd"> <en-export export-date="20090314T120030Z" application="Evernote/Windows" version="3.5"> <note><title>Post-title File
</title><content><![CDATA[<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml.dtd"> <en-note></en-note>]]></content><tag>Journal</tag></note></en-export>I find this script much quicker to run than creating the new note in the right notebook, typing in the date (after trying to recall what it is) and then adding the tag. I simply trigger it from PS menu (see previous article) and that's it done.
The one thing it's missing for me is automatically selecting the note in Evernote. It's something I can live with for now because it's still a little quicker for me than creating it myself, but until a fully integrated template system becomes available in Evernote I think this is about as good as I'm going to get it.