Lingon didn't work correctly, on second glance. Must be due to the fact that it's been out of development for over 2 years. I've been messing around with launchd and it turns out that when used correctly, it is incredibly useful and effective. I've created a launchd .plist file (without Lingon) that will monitor the Chrome bookmarks file for changes and execute janedenone's bookmark export script (make sure you save a copy of the script to a directory in your home folder). I've made a few comments (denoted with "#" symbols, for non-programmers) that need to be customized by you before they will work correctly. Make sure you remove them before you save the .plist file.
First, you need to create a new file in your ~/Library/LaunchAgents/ directory using your favorite plain text editor (I use vim). It needs to be named something like com.blah.chrome_export.plist. I named mine org.myname.ExportChromeBookmarks.plist.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.myname.ExportChromeBookmarks</string> # This should be the same as the name of your .plist file except without the .plist extension.
<key>ProgramArguments</key>
<array>
<string>/Users/myname/export_chrome_bookmarks.sh</string> # This should be the full path to the bookmark exporting script you saved. Make sure your script is executable otherwise this won't work (use the chmod +x command in terminal on the script).
</array>
<key>WatchPaths</key>
<array>
<string>/Users/myname/Library/Application Support/Google/Chrome/Default/Bookmarks</string> # Full path to Chrome bookmark file. You should only have to change the username here.
</array>
<key>Nice</key>
<integer>1</integer>
</dict>
</plist>
Once you've made your changes and saved the file to your ~/Library/LaunchAgents folder, you need to load it so launchd will run the script correctly. Open terminal and type:
Code: Select all
launchctl load ~/Library/LaunchAgents/com.myname.ExportChromeBookmarks.plist # make sure you use the filename you chose
You may have to run janedenon's exporting script once manually just so the html bookmarks are written the first time (for use in LaunchBar).
This works great for me. Hopefully someone else gets some use out of it.