Archive Yojimbo Bookmarks

Yojimbo can catalog bookmarks as well as web archives, which are basically local copies of web sites. This script creates web archives from existing bookmarks you select.

tell application "Yojimbo"
-- get the selected items, if any
 set _items to selection
 if _items is missing value then return

-- archive all the selected bookmark items
 repeat with _item in _items
  if class of _item is bookmark item then

-- bookmark properties the archive should inherit
   set _name to name of _item
   set _url to location of _item
   set _tags to tags of _item

-- archive the bookmarked page
   try
    set _archive to make new web archive item with contents _url with properties {name:_name}
    add tags _tags to _archive
   end try

end if
 end repeat
end tell

Download ArchiveYojimboBookmarks.scpt.zip 1.1 3k

Install the script in ~/Library/Scripts/Applications/Yojimbo. The script does not check whether there is already a web archive for the bookmarked location, but it could be done.

Posted on Sunday, July 15th, 2007. Tags: , , .