If a note's $AutoFetch value is true
, Tinderbox automatically updates the note's $Text to use data drawn from the source stroed in the note's $URL. The latter may be any of:
- URLs accessible via the Web.
- locally installed app pseudo-protocol URLs, e.g. "devonthink://…", "bookends://…", etc.
- local URLs, e.g. "file:///…".
The AutoFetch process facilitates automatically updating note $Text from other text sources. As well as the more obvious sources such as web pages or RSS feeds, AutoFetch works with a range of file types, including text, rtf, Microsoft Word®(.doc), pdf, and markdown (.md) files.
Once AutoFetch has run, the note containing the retrieved data also has its $ReadOnly attribute automatically set to true
. This avoids the user trying to edit text that will get automatically overwritten when AutoFetch next runs.
Including the first setting of the process, when does AutoFetch run on a note and alter its $Text:
- on (re-)setting $AutoFetch to
true
. - on document load, all existing AutoFetches run once.
- on (HTML-type) Export, all existing AutoFetches run once to refresh the exported content.
- while the document is open, no more than once every 5 minutes as part of the general agent & rules cycle. The time to the next cycle is shown in the circular 'Network' display on the the Agents & Rules tab of the Tinderbox Inspector.
For deeper, more complex, be aware of the experimental attribute $RawData, which holds existing raw data (not post-processed) should the next planned fetch fail.
Post-processing AutoFetched data
It is possible to process imported data, before it is added to the note's $Text. This is done by setting valid action code in the same note's $AutoFetchCommand, whose operation is described separately in AutoFetch commands.