In order to accomodate the additional document functions which have been rolled in to the bookmarks book from Preferences and Migrations, the document window in the new application is tabbed. The tabs are
- Content. Shows the bookmarks and folders in hierarchical or flat view, with search fields; basically the Bookdog document window as it is now.
- General Preferences. Same as Bookdog's Preferences > General, but laid out to only the attributes of the (one) subject bookmarks book document, so there is no table. In addition, four checkboxes will be used to specify whether or not the document has a Bookmarks Bar, Bookmarks Menu, Unfiled Bookmarks, and/or Shared Bookmarks collection. The first two collections are to mirror the collections featured by most web browsers, Unfiled Bookmarks is a feature of Firefox 3 and Shared Bookmarks is a feature of OmniWeb. It is hoped that these four collections, or variations of them, will be sufficient to mirror the collections of any browser or web service for the foreseeable future!
- View Preferences. Same as Bookdog's Preferences > View, but laid out to only the attributes of the (one) subject bookmarks book document, so there is no table.
- Order. Same as Bookdog's Preferences > Sorting Order, laid out to only the attributes of the (one) subject bookmarks book document, so there is no table.
- Sync In/Out. See detailed description.
- Automation. Subsumes Bookdog's Open ("do upon launch") preference pane, the Bookwatchdog preference pane and the scheduling of Migration actions which must be done in Bookdog using Automator or the Bookdog Migration Scheduler. In this tab, the user configures a list of background jobs which are done while the new application is not running. Each job must have one or more triggers which may be configured configured to execute a sequence of commands.
The following triggers are available in a popup menu in the Type column:- When I launch New Application.
- When I 'Save' this Document.
- Bookmarks Changed in Browser. When this is chosen, it is followed in the Detail column by another popup. The items in the second popup are a selection of installed browsers.
- Scheduled Time of Day. When this is chosen, it is followed in the Detail column by another popup which has a time-and-minute selector, NSCalenderSelector or whatever they call it.
- When I Log In to my Mac Account.
Note: "Change in Safari Bookmarks" triggers 3 minutes after the actual change. Change in Other Browsers bookmarks triggers when the browser quits.
The available commands are:- Sync In. Followed in the Detail column with several choices:
- Yield to browser.
- Ask user if OK to quit browser
- Quit browser.
- Kill browser.
- Sort
- Find Duplicates
- Verify
- Sync Out. Followed in the Detail column with three choices:
- Yield to browser.
- Ask user if OK to quit browser
- Quit browser.
- Kill browser.
The Yield/Ask/Quit/Kill browser details handle the conflict which sometimes occurs if a browser is running. The problem is that, of the desktop web browsers, only Safari can handle either a Sync In and Sync Out while it is running. Other browsers can handle a Sync In only, except for Firefox 3 which can handle neither Sync In nor Sync Out. So, if a Sync In or Sync Out command in a job would be something that a running browser cannot handle, the new application (or Background Worker) needs to know what to do. The default is to Yield to the browser and abort the job; it doesn't get done. The second choice is to ask the user in a dialog. Of course, this option is not available for jobs started by unattended triggers. The third choice is to send the browser(s) Quit message(s). But web browsers frequently display stupid dialogs when you ask them to quit, for example: There is a window open. Are you sure you want to quit? If a user has scheduled a job to run overnight, there will be no one to answer this dialog. Therefore, the final option, useful in the overnight-job situation, is to Kill the browser, with no questions asked.
For example, to orderize Safari bookmarks whenever they are changed, the trigger would be Change detected in Safari, and the commands would be:- Sync In (which is configured in Sync In/Out to sync in from Safari only).
- Orderize all items.
- Sync Out (which is configured in Sync In/Out to sync our from Safari only)
- Sync In (which is configured in Sync In/Out to sync in from Safari, Camino and Firefox).
- Sync Out (which is configured in Sync In/Out to sync out to Safari, Camino and Firefox).
Note that, due to the unification of functions which were separate in Bookdog, many possible previously-impossible automatic jobs, such as the above example of synchronizing when a browser is quit, are now possible.
Before executing any command, New Application determines if it is necessary. Generally, if the bookmarks involved have not changed in any way that could affect the result since the last time the command was executed, command execution is not necessary and is skipped. The details of this determination are kind of complicated.
More to come.