Advice on changes to the "Journal Entry.dtTemplate"

I am experimenting making a journal template.

I went to Help > Support Assistant > Install Extras > Templates and installed the “Journal Entry”.

By going to Data > New from Template > Open Templates Folder, I found the file “Journal Entry.dtTemplate”, right-clicked it to “Show Package Contents”, opening the “English.lproj” folder and began to edit the “%longDate%.rtf” file.

I was able to edit the actual contents of the .rtf file all right, using TextEdit, but I also wanted to change the title of the file, from just the ‘long date’, to the ‘long date’ with the time also, so I renamed it “%longDate% - %time%.rtf”.

This worked fine, and produced:

Tuesday, 9 February 2021 - 11:01:56

However, I don’t want the comma to appear after the weekday. But I don’t know where or how these placeholders are defined, so I don’t know what alternative placeholder to put in the file title to delete the comma. In other words, what to replace the “%longDate%” part with, so that the file will be named:

Tuesday 9 February 2021 - 11:01:56

… instead of the one above with the comma.

I also wanted to make sure the time is formatted in a 24-hour format.

So all that would be the equivalent of the PHP:

date('l j F Y - H:i:s')

Is this possible? I may want to use other formats in the future, too.

Also, is it right that this template file is placed by default alone in the “Templates.noindex” folder? I’d expected it to be placed in the “Productivity” folder within the “Templates.noindex” folder.

Lastly, are such templates likely to be usable in any versions of DTTG, or are these always going to be meant purely for the desktop app?

OK I think I have it as:

%weekday% %day% %monthname% %year% - %time%.rtf

(Except for the leading zero in the day)


You can insert placeholders easily via the submenu Insert Placeholder of the contextual menu of plain/rich text views and Markdown source view.

If I try that in the editor, either Markdown or .rtf, the placeholder remains as the placeholder …

Yes, it’s for editing template documents. You would have to export it afterwards via File > Export > As Template…

Ah, right - I understand.

… but that doesn’t work as well as the method I outlined above (i.e., going into the package contents) because the export as template just gives it a title without placeholders. (i.e., it doesn’t end up as a .dtTemplate file) ?

This is only intended for document-based templates, not for editing or creating dtTemplate packages.

I see that. But it’s not so good, because you can’t define the title of the actual file from the placeholders, which is obviously useful for a journal-type group. (I’m only editing the English, but without a proper mechanism, it’s the best I can do.)

1 Like

DEVONthink’s templates currently are not portable between the Mac and iOS.

PS: What are you referring to as the title of the file? In the contents or the filename?

I guessed as much.

I mean the file name.

For instance if I name the template .rtf file (that’s the one inside the package contents):

%weekday% %day% %monthname% %year% - %time%.rtf

… then when I choose it from the Data > New from Template menu, the file name in DT3 will be ready formatted for the current date and time of entry.

I was doing all this because I thought I could coax DT3 into acting as a sort of journal; however I find that inserted images (which often start out life as being quite large) aren’t resizable in the editor, so it doesn’t really look viable, if one wants photos.

You certainly can use DEVONthink for journaling. I journaled daily in Markdown in DEVONthink for three years.

Also, there is no issue using placeholders in template filenames…

The result…

Note: Colons are not safe for the Finder as they’re the HFS/APFS delimiter for folders. In the Finder, the filename will have these converted to hyphens. Just a tech note.

You should make it a habit to resize images before inserting them into documents.
Also, Preferences > Editing > Scale image attachments will visually scale images in RTFD files though it has no effect on the actual linked images.

Well, yes, what you describe and illustrate is exactly what I did.

I haven’t experimented with changing the .rtf to a .md file yet.

But I notice you write “I journaled” - past tense.

I have been using Day One, but between you, me and the rest of the Internet, I don’t have absolute confidence in their security, ever since the incident where some customers’ journals appeared in other customers’ apps. This is one reason I thought of trying to journal in DT3, since the sync encryption offers pretty good security, whatever cloud service I use.

Having said that, resizing images first, etc… Hm… Actually I do have the “Scale image attachments” preference checked, but it didn’t make a difference - but maybe that was because I was using .rtf and not .rtfd?

And there’s no easy way (as yet) to do all this on mobile with DTTG. Possibly you’ll tell me it’s doable, but it’s bound to be a bit more fiddly than Day One - for instance, the way you just take a photo in the app, etc.

But I shall continue to experiment.

Yes it’s past tense though I’ll be resurrecting it in the near future… in DEVONthink.

let us know, please!