Update: Version 1.0.1 is now the current download. Fixes Safari functionality and allows the optional use of a dotfile (~/.dropboxid with the 5-digit Dropbox user id in it) instead of modifying the script directly.

Since it doesn’t absolutely require user editing now, it’s also codesigned to avoid any issues.

Rick Martin left a comment on my “Write Better Markdown” post that reminded me of a relatively simple amalgamation of projects I’d had in the back of my mind for a couple of years now. I knocked it out as an Automator workflow today.

Borrowing from the Markdown Service Tools browser commands and the original Dropbox Collection Service I made a few years ago, “Share Tab Collection” is a useful tool for anyone who collects in browser tabs during meetings, brainstorming sessions, podcasts, or any time you have a browser full of tabs and want to distribute them.

Run it, and whatever tabs are open in the front window of your browser (Chrome or Safari) will be collected into a web page and a Dropbox public URL will be placed on your clipboard for sharing. Like the original “Collections” Service, it includes an “open all” link that will restore the entire session with a single click.

The output page has updated styling (compared to the original Collections Service) and works on small (mobile) screens. Other than that, it’s very simple.

HTML files are stored in ~/Dropbox/Public/LinkCollections (it will make the folder if needed) and named with a timestamp. You can remove them from public view by deleting or moving those files at any time. You can also go in and edit them manually if you’re industrious and need a quick fix.

Download at the bottom.

Configuration

Update (1.0.1) The instructions below will still work, but you can also use a dotfile to define the Dropbox user ID. Follow the same steps to retrieve it, but then paste it into a file called .dropboxid in your Home folder.

For simplicity’s sake, just copy the 5-digit number from a public URL, then run this in Terminal: pbpaste > ~/.dropboxid. Done.

The only setup you need to do is to open the workflow in Automator and edit the USERID variable at the very top of the Run Shell Script action. This should be set to the portion of a Dropbox url for a file in your “Public” folder. Here, I made you a picture.

Save the workflow and it’s ready to run. You can also hold down Option in Automator’s File menu and choose “Save as” to convert it to an Application bundle. Workflows are easy to trigger with tools such as EventScripts, BetterTouchTool, LaunchBar, Alfred and others, but an Application can be more convenient if you just want to double click or Spotlight-launch it.

Usage

  1. Bring the browser window with the tabs you want to collect to the front
  2. Run the workflow
  3. Optionally enter a title for the collection (provides a default title if left blank) and hit Continue
  4. The tabs will be collected, a page generated, and a Dropbox public URL placed in your clipboard
  5. Lastly, it will ask you if you want to open the URL immediately, clicking OK will load it in a new browser tab

If Chrome is running, it’s prioritized as default browser. If it’s not and Safari is, then it will use Safari’s front window instead. If no browsers are running, it will curl up and die.

Hacking Around

There are a few optional parts of the workflow you can remove or modify as desired.

The “Ask for Text” action that prompts for a collection title can be deleted if you want to always use the default date-based title format.

The last three actions (Ask for Confirmation, Get Value of Variable, and Run Shell Script) can be deleted if you never want to open the url, or…

You can remove the Copy to Clipboard action and the Ask for Confirmation command to only open the URL, without asking and without copying to the clipboard.

You can also add a “Display Notification” action if you want additional feedback.

Download

Share Tab Collections v1.0.1

Share a URL with a collection of all tabs in your browser window

Published 09/03/15.

Updated 09/03/15. Changelog

DonateMore info…