Saving and using Safari tabs

Newbie here, trying DT via the 4 beta and having a lovely time. Inertia has kept me at Evernote for some time, but that app has wandered too far from its original intentions. I’ll be dumping EV and buying DT as soon as 4 has its full release.

Anyway, one brief question for now. I tried the facility to save (in my test case) three current Safari tabs, which gave me a dated “Safari: xxxx” group, within which is a group called “Window 1”, within which are Web Internet Location links to the three tabs.

The suggested use is to drill to Window 1, highlight the WILs you need, right-click, and choose Launch URL which opens the tabs afresh in Safari.

That seems very longwinded. As far I can tell, I can’t simply double-click “Window 1” to go straight to those tabs in Safari, which strikes me as the actually useful scheme.

Of course, I could do this in Safari itself, as a saved group of tabs, but I can see some use for doing it direct from DT. Am I missing something?

You can make that possible with a script attached to the group Window 1. (Search for attached script in the documentation for more info on that.)

on triggered(theRecord)
	tell application id "DNtp"
		repeat with theBookmark in (children of theRecord whose type of it is equal to bookmark)
			do shell script "open " & (URL of theBookmark)
		end repeat
	end tell
end triggered

I couldn’t find the Attached Script item in the Info pane, though. Is this a bug in DT4.0beta1?

Welcome Django!

I was about to ask where you saw this, but I guess you’re referring to this blogpost.

Now, what is your goal with saving the tabs?

To me the script makes sense as a way to quickly save a snapshot of a browsing session, so you can close everything and go about your day. Then later sort through it in DEVONthink. Which means it’s most useful if you want to use the bookmarks inside DT.

Why would you want them there?

  • DT has its own internal browser. You don’t have to open them again in Safari.
  • It makes it easy to use DT’s many tools on them: Capture, convert, summarize, merge, etc. Or in scripts.

If you don’t actually want to work with the bookmarks in DT, but just want an easy way to restore/continue a session in Safari, I think it makes more sense to use Safari’s own tools (i.e. bookmarks, tab groups, pinned tabs and profiles). There are also many browser extensions built for this: OneTab, Tab Space, Tabs Saver, Tabby and more.

Personally: If I have many tabs open and want to save them before I close everything, I usually don’t want individual bookmark items. Instead I use a similar script that saves all windows & tabs as a list in a new markdown document.

1 Like

And I originally got the concept from: https://sessionbuddy.com

Nice, never heard about it.

For reference, this is the script I use to save a session as a markdown file: yyolk/urlsafari.scpt - GitHub Gist.
(I just modified it to use unordered lists instead numbered ones.)

Hello DevonThinkers, and thanks so much for your replies and suggestions. As I said, still getting my head around possibilities and strategies, and you’ve given me some interesting new diversions to consider. I’ll give it more thought and report back, but in the meantime, thanks for all the fish.

No, it’s not a bug. It’s a change in behavior for DEVONthink 4.

1 Like

So, I’ve now had some time to consider your helpful and inspiring replies.

I imagine I’ll be browsing and researching online primarily in Safari, but I take the point that once I’ve saved some links to DT, I can look at them in the DT browser and work on them/save them/delete them/etc from there.

I’m pretty sure, again based on all your help, that my idea for launching saved groups of URLs from DT is not a good one. That really is best done—the saving of the groups in the first place, and the later deployment of them—from Safari (or browser of choice). My use case here is a group of regular research sites that it would be handy at a certain point in a project to have available quickly and easily.

Anyway, still excited to dig deeper into DT and learn more about all the possibilities.

2 Likes