Sync some Google Bookmarks with Safari
Jul 20, '07 07:30:03AM
Contributed by: swiney
I like having machine spefiic bookmarks on each machine I work at (home, work, etc.), but also like having a common set available to each machine. I store my shared bookmarks in Google Bookmarks. I wrote an Automator workflow to download my Google Bookmarks and add them to the Safari bookmarks bar (but leave alone the bookmarks I already have there.) Safari automatically notices when its bookmarks file has been edited and automatically updates itself.
NOTES:
- You must be logged into Google services (Gmail, etc.) in Safari to run the workflow.
- The bookmarks are in submenus by label.
- The script assumes that a ':' in a label is a hierarchy separator, so Art:Photography would put a Photography menu inside an Art menu inside the Gmarks menu.
- If you label a Google Bookmark with multiple labels, it will show up in all the corresponding submenus.
- The script includes adding a label for when it was last run (inside the menu), and an item that runs JavaScript to add the current page to your Google Bookmarks.
- In addition to making a new Bookmarks file, the script makes a Bookmarks_no_google.plist file, so you can always go back to the bookmarks you had before running it.
- Tested and working in both Safari 2 and 3.02 beta.
- You may run into trouble if you move the Gmarks menu to other places in the bookmarks bar.
It's available as a disk image [16KB download] on my site.
[robg adds: I created a .zip version (8KB) of the workflow on the macosxhints server, in case the original ever vanishes (but that should be your first choice, in case the code ever changes. I haven't tested this, but you can open the workflow and look at the code yourself -- it includes a perl script that does most of the hard work.]
Comments (5)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20070719135209367