I posted a way to save your Safari tabs to Evernote, which I’ve found is generally a great way to save bookmarks. It syncs automatically to your other computers and your iPhone, and it’s fast and easy. If you really want to highlight a few tabs to make sure you get back to them, you might consider this script, though. Once you’ve saved your entire Safari browsing session for later, close everything except for those special urls, run the code below as a script, and your open tabs will be saved as entries in your InstaPaper account.
There are two “property” lines at the top of the script; edit them to set your Instapaper username and password (if you have one, otherwise, set it to ""). The next section handles everything, iterating through each tab, grabbing its title and url and building a shell command to do a simple curl call to the InstaPaper API.
After that, the rest of the script is a routine for url encoding that I nicked here. It’s called when setting both the _title and _url variables to make the curl call from the shell work. I haven’t tested this extensively yet, but it’s worked for everything I’ve tried. A title with odd characters in it could potentially cause problems. You can always add a shell-escaping routine…
Brett is a writer and developer living in Minnesota, USA. You can follow him as ttscoff on Twitter, GitHub, and Mastodon. Keep up with this blog by subscribing in your favorite news reader.