Built-in Web Browser and/or Auto-Updating Web Archives

I’m considering switching to EF from DTP, but the lack of a built-in browser is a major negative factor. I have hundreds of bookmarks in my DTP database and it’s convenient to be able to view the web pages within DTP. I realize they can be saved as Web Archives, but the nature of the web is that any web page is obsolete within a few days. Therefore, I prefer to simply store the bookmarks and have it open the latest version when I view the bookmark.

Another approach (not necessarily mutually exclusive) would be to provide an option for EF to automatically update the Web Archive each time you view it. I know there are scripts that can do this, but it’s an extra step to have to run a script to manually update it. It would be better if it just updated it automatically, perhaps no more than once per day. This could be the best of both worlds. It would enable you to store and index the web page content, yet each time you view it, it would fetch the latest version.

If you provided both these features, it would be an improvement over DTP’s bookmark/archive handling and I would certainly switch at that point.

Thanks for the feedback. I will look into adding a built-in browser for bookmarks.

To me, the point of a Web archive is to store a snapshot of the way a particular page looked at a particular time. If the page changes, you then always have a copy of the way it was when you read it. In other words, it protects you from losing information. If the Web archive auto-updates, this benefit is lost. The Web archive essentially becomes a bookmark with cached content. I don’t see much benefit to that except that you can search for the cached content. Am I missing something?

Yes, the only difference is you can search for cached content. However, since one of the main purposes of EF is to make all your content searchable, being able to search the cached content is a pretty big advantage.

The downside to WA’s is they’re static and quickly become obsolete. Having the option to refresh them automatically would provide the best of both worlds…searchable content that automatically stays current. Nevertheless, there are certain WA’s you wouldn’t want to update automatically. The WA may reference specific content you want to keep, even if the web page eventually goes away. Therefore, I’d suggest you provide two types of WA’s, static and dynamic. The current WA implementation would be called Static. The new implementation would be called Dynamic and would update each time it’s viewed, but no more than one update per day.

Thanks for explaining. I just wanted to confirm that this is in fact what you want. As you say, not every Web archive should be auto-updated. Perhaps this could be controlled with a tag. I will consider this for a future version. In the meantime, there is a script for manually updating the selected Web archives.

AppleScript modification to update WA based on tag name

This is a quick and not very elegant modification of the “Reload Web Pages” AppleScript to try and add the requested dynamic behavior based on tag name. I could not figure out how to select all records in a library, so I used “System Events” to select all records in a given view. Then the script simply looks for a specific tag and reloads content as necessary. It seems to fail gracefully if there are no “dynamic” tags … but not much else for error capture or correction. Use with caution. ***Forgot to mention that you will probably need to authorize Script Editor.app in the Security & Privacy -> Accessibility System Preference to use System Events.

tell application "EagleFiler"
	activate
	tell application "System Events"
		tell process "EagleFiler"
			click menu item "Select All" of menu 1 of menu bar item "Edit" of menu bar 1
		end tell
	end tell
	
	try -- requires EagleFiler 1.7
		set _records to current records of browser window 1
	on error
		set _records to selected records of browser window 1
	end try
	
	--replace "dynamic" text below to customize your own tag name
	repeat with _record in _records
		if _record's assigned tag names contains "dynamic" then
			my reloadWebPage(_record)
		end if
	end repeat
	
end tell

on reloadWebPage(_record)
	tell application "EagleFiler"
		set _url to _record's source URL
		set _container to _record's container
		tell _record's library document to import URLs {_url}
		set _newRecord to item 1 of the result
		set _trash to trash of _record's library document
		set _record's container to _trash
		set _newRecord's container to _container
		my copyMetadata(_record, _newRecord)
	end tell
end reloadWebPage

on copyMetadata(_source, _dest)
	tell application "EagleFiler"
		set note text of _dest to _source's note text
		set _tags to _source's assigned tags
		set assigned tags of _dest to _tags
		set title of _dest to _source's title
		set label index of _dest to _source's label index
	end tell
end copyMetadata

Another idea would be to have it check all the records in the library, not just the ones currently being displayed.

Modified AppleScript

Forced me to learn something new! This version first selects all records in the current library then filters for non-trashed records and final for records with the “dynamic” tag. Again, no active error correction or real consideration for edge cases … but it works.

tell application "EagleFiler"
	set _records to library record in current library document
	repeat with _record in _records
		if _record's trashed is false then
			if _record's assigned tag names contains "dynamic" then
				my reloadWebPage(_record)
			end if
		end if
	end repeat
end tell

on reloadWebPage(_record)
	tell application "EagleFiler"
		set _url to _record's source URL
		set _container to _record's container
		tell _record's library document to import URLs {_url}
		set _newRecord to item 1 of the result
		set _trash to trash of _record's library document
		set _record's container to _trash
		set _newRecord's container to _container
		my copyMetadata(_record, _newRecord)
	end tell
end reloadWebPage

on copyMetadata(_source, _dest)
	tell application "EagleFiler"
		set note text of _dest to _source's note text
		set _tags to _source's assigned tags
		set assigned tags of _dest to _tags
		set title of _dest to _source's title
		set label index of _dest to _source's label index
	end tell
end copyMetadata