Put Daily Journal entry in specific database?

I love the Daily Journal template. I’m using it and planning on moving things out of Day One and into DevonThink and both moving away from a proprietary format and an additional subscription.

I’ve managed to move a copy of the template into the toolbar folder and add that to the toolbar so that I can easily press the button to add to my daily log.

But if I don’t have my “Personal” database highlighted in the sidebar, the template creates a new entry in whatever database I’ve been using last when I press the toolbar button.

I don’t know very much about apple scripting. I’d like to modify the properties of the DNtp variable so that the button creates in my “Personal” database which lives in my user/database/ folder. Could someone tell me how to do that? I’ve tried guessing and adding to the script, but it’s not working.

Thanks.

I’m not sure which script you mean. When I look at the source of the Journal entry template, I see only three RTF files (for English, French and German). And according to the documentation, this template is text-only, not script based.

Edit: I think I found what you’re referring to: Productivity/Journal? In that case, these two lines in the script might be of relevance

set myGroup to create location "/Journal/" & "/" & theYear & "/" & numMonth
set recordName to theYear & "-" & numMonth & "-" & theDay & " " & shortWeekday

From you post, I understand that the “Journal” group should always be located in your database “Personal”.
So

set myGroup to create location "/Journal/" & "/" & theYear & "/" & numMonth in database "Personal"

If you don’t like the name of the newly created record, you’d have to change the second line I quoted.
Disclaimer: I took this code verbatim from a script @pete31 posted some time ago. Since I’m not an AppleScript afficionado, I might have gotten that wrong.

You might want to check DT’s scripting dictionary in the Script Editor – always a good point of reference for scripting questions.

4 Likes

Bless you - that’s worked perfectly. I didn’t know I need to append the location line with “in database”

Made the change you suggested and it worked exactly like I wanted it to work.

Hi chrillek,

I would like to change the location of the designated location for daily journal RTFs as well.
I do not know how to script, so forgive me if I cannot see the difference between the commands you’ve displayed.

If I wanted to have each daily journal RTF located in a specific group, would I just replace the "/Journal/" with "/insert chosen group name/" ?
Would changing the default location be that easy?

It’s not my script, but that should work.

Yes that would be possible.

thank you for your replies. I tried it once, but it did not work. Perhaps I edited the wrong file (I tried editing the template file from the productivity folder).
I will try again. I just thought I’d show curtesy first and respond.
Thank you

Make sure you copy the template first so you can preserve the original.