Choose Open Stationery Folder to have EagleFiler open the Stationery folder in the Finder. This feature lets you create any type of new file from within EagleFiler. Whichever files you put in the Stationery folder become available as templates in the File ‣ New Record menu.
You can assign keyboard shortcuts for them from the Keyboard pane in System Preferences. (Click on Application Shortcuts and then click the + button to add your own shortcut.)
Note: You can also put whole folder hierarchies in the Stationery folder, e.g. if you often need to create subfolders with a particular structure.
Setting Metadata via the Finder
You can edit the stationery file in the Finder in order to control the metadata that EagleFiler assigns when creating a new record from the stationery. For example, you can assign a label or add Spotlight comments. The new record will have the same label as the stationery file, and the Spotlight comments will control the tags and notes. To set the tags to “journal” and “draft” and the note to “This is the note.”, set the Spotlight comments to:
&journal &draft This is a note.
Setting Metadata via AppleScript
You can also set the metadata via AppleScript. This provides more control—for example, you can set a title that’s distinct from the filename. It also lets you set the metadata dynamically—that is, it can be determined when making new records from the stationery rather than when the stationery is first created. Therefore, the metadata can be based on the current date, the current user, the current iTunes track or iChat status, or any other information that’s accessible via AppleScript.
To set the metadata via AppleScript, create a compiled script file next to your stationery file. If the stationery file is Journal Entry.rtf, the script should be called Journal Entry.efmeta.scpt. EagleFiler will automatically run the script when you create a new record from the Journal Entry.rtf stationery.
Here’s an example metadata script:
on metadata(_context)
set _title to "Blog Entry"
set _base to do shell script "date '+%A, %B %d, %Y'"
set _systemInfo to system info
set _from to long user name of _systemInfo
set _tags to {"journal", "draft"}
return {|title|: _title, |basename|: _base, |fromName|: _from, |tags|: _tags}
end metadata
This would set the title to “Blog Entry”, the filename would be based on the current date (e.g. “Tuesday, October 21, 2008.rtf”), the from would be the name of the user logged into the Mac (e.g. “John Appleseed”), and the tags would be “journal” and “draft”.
Metadata Script Details
The script should contain a handler called metadata with a single context parameter.
The context is an AppleScript record containing the following keys: |folderName|, |libaryPath|, |stationeryBasename|, |stationeryName|, and |stationeryPath|. The script can ignore the context, or it can use it to find out about the stationery file and where the record will be created.
The metadata handler should return an AppleScript record containing one or more of the following keys: |basename|, |fromName|, |note|, |sourceURL|, |tags|, |title|.