How to edit templates?

How do you edit templates for DEVONthink Pro Office? I want to make just a few changes to the Journal template that you can get from devontechnologies, but all my attempts to open it fail.

I believe these are Apple Script files. Unfortunately, I’ve never used Apple Script so I’m assuming I’m doing something fundamentally wrong.

The best clue I’ve found on the web says to do this:

  1. Go to the DEVONthink/Templates.noindex folder
  2. Make a copy of the “Journal Entry.dtTemplate” file.
  3. Rename the copied file so that it has a scptd extension.
  4. Double click on the new file to edit the script.

However, when I do that, AppleScript Editor launches and says it cannot open the file.

Clearly I’m doing something fundamentally wrong.

Any clues as to what I’m really supposed to do? I looked around in the DEVONthink documentation that came with the product, but I can’t find any information on editing or creating templates.

Some templates include scripts, others do not. The particular template mentioned (JournalEntry.dtTemplate) does not contain scripts. It is, however, a package - a type of folder. By control-clicking the template in Finder, and choosing Show Package Contents, you might see the internal files that comprise the template:

Depending on the localization you use, chose and edit the RTF file (in this example, %longDate%.rtf). Take care not to change the names of the placeholders, which are the strings surrounded by %s. DEVONthink Help provides a list of the placeholders that you can put into templates, and what they do.

Thanks, that helps.

The list of allowable placeholders is pretty limited. Is there a way to get %time% to use a 24 hour clock (which I prefer for timestamps). Also, %date%, %month%, and %day% do not force single digit elements to two-digits. That is, they use ‘5’ for May instead of ‘05’. Is there a way to force it to use two digits? Else, sorting is problematic.

To modify the placeholder behavior or add new placeholders you’d need scripting. The templates with the “.templatescriptd” extension contain RTF templates and scripts. They are also packages, so you have to use Pathfinder or display package contents in Finder to look inside. You mentioned you don’t use AppleScript yet – but it’s easy enough to merely copy one of those “.templatescriptd” packages and play around with it. The scripts tend to look a bit daunting, but customizing frequently involves only a small portion of the code. The scripting section of this Forum contains many threads of a how-to nature.