Bookmark Folder Splitting in Safari?
March 15, 2005 6:17 AM   Subscribe

SafariFilter or AppleScriptFilter: I very often collect bookmarks of pages I'd like to look at in Safari, through the double magic of NetNewsWire and Saft. The problem is that I end up having one folder with 180+ bookmarks in it. I often then manually split them into chunks of 20 using cut and paste, but it strikes me that there's got to be an easier way to do that automatically via AppleScript. However, my google-fu fails me in that respect. Anyone know of a link to an AppleScript that takes one bookmark folder and splits it into folders with x number of bookmarks each in them? Or any AppleScript master and MeFi resident out here savvy enough to whip one up for me? I'll send you a cute picture of my cat sunning himself in a sunbeam, if you want. :)
posted by WCityMike to Computers & Internet (4 answers total)
I realize this isn't what you're asking for, but since I started using with cocoalicious, I've stopped using Safari's bookmarks entirely. Might be worth a look.
posted by adamrice at 7:49 AM on March 15, 2005

Unfortunately, Safari doesn't have the scripting vocabulary to process its bookmarks.

The bookmark file is a text file in your ~/Library/Safari folder with an XML structure.

Unfortunately, the Property List Editor isn't scriptable at all!

It looks like your best bet would be a Perl or awk-based Applescript that scans the bookmarks file for top-level nodes (bookmarks bar, bookmarks menu) and splits up the children (bookmarks) within each node.

This may a good piece of code to hack away at. It imports Safari-structured XML and exports a Netscape-like HTML bookmarks file.

You could pop in a loop here that creates new bookmarks folders in the exported Netscape-style bookmark file, every x bookmarks.

Take the exported file and bring it into your ~/Library/Mozilla (bookmarks.html) or ~/Library/Explorer (Favorites.html) user folder.

The Safari application itself lets you import your current bookmarks from other browsers when you first launch it. But if you enable the Safari debug menu, you can import those bookmarks from Internet Explorer, Mozilla, or Netscape whenever you want. A couple of free maintenance applications that let you easily turn on the debug menu in Safari are:

• Tinkertool
posted by AlexReynolds at 7:50 AM on March 15, 2005

URL Manager might do the trick, but it ain't free.

I second the recommendation.
posted by O9scar at 8:45 AM on March 15, 2005

Thanks, guys. I ended up programming a macro to perform the necessary keyboard movements, since it is not scriptable. :(
posted by WCityMike at 8:48 PM on March 15, 2005

« Older Looking for The Roots/The Seed Remix?   |   Chipotle recipes Newer »
This thread is closed to new comments.