Refetch Web Page
Summary: Re-downloads the Web pages for the selected records.
Requires: EagleFiler
Install Location: ~/Library/Scripts/Applications/EagleFiler/
Description
This script creates new Web archives (or whichever Web page format you chose in the preferences) for the selected records. It can be used to convert bookmarks to Web archives, to download the latest versions of pages that may have been updated, and more. The metadata is transferred to the new Web archives.
Download in Compiled Format · Download in Text Format
Script
on run
tell application "EagleFiler"
set _selection to selected records of browser window 1
repeat with _record in _selection
my refetchWebPage(_record)
end repeat
end tell
end run
on refetchWebPage(_record)
tell application "EagleFiler"
set _url to _record's source URL
if _url is "" then return
try
set {_newRecord} to import URLs {_url}
on error
return -- Error fetching page; move on to the next one
end try
set _newRecord's container to _record's container
set note text of _newRecord to _record's note text -- does not preserve rich text
set _tags to _record's assigned tags
set assigned tags of _newRecord to _tags
set title of _newRecord to _record's title
set from name of _newRecord to _record's from name
set label index of _newRecord to _record's label index
end tell
end refetchWebPageLast Modified: 2011-09-23
Running the Script
You can use AppleScript Editor (AppleScript Utility prior to Mac OS X 10.6) to enable Mac OS X’s built-in Script menu. To run the script, just select it from the menu. FastScripts provides a similar menu that supports keyboard shortcuts and other features.