Solution/Script to automatically sync Safari’s Reading List to Read-it-Later services like Pocket or Evernote

data synchronizationplistreading-listreaditlatersafari

MacOSX contextual menus allow me use Pocket [Formerly Read it later] to archive all, and also read, some of the enormous amounts of content that I come across daily on my browser of choice – Safari.

On iOS [iPad/iPhone] however, the native 'Add to Reading List' feature for Safari is the most tightly integrated option when 'long-clicking' a URL in many different apps, like Mail [all newsletters with links]. This has caused a lot of grief for me as half on my links are saved to the Safari Reading List, and half to a Read-it-later service like Pocket.

Consolidating it in a seamless way when using iOS is a challenge if you wish to avoid opening the webpage in safari first, then clicking a bookmarklet, etc.

Web-based trigger services like 'IFTTT' are only useful when the content has already made its way to Cloud services that it supports, like Pocket, Evernote etc.

One conceptual solution to this problem could be something along the lines of having a script run on my mac that is periodically looking for new items in the 'Reading List' plist file and extracting the url when it sees a new item added [since iCloud syncs iOS and MacOSX Safari]. Perhaps Alfred or some other automator service could then get it to a spreadsheet on the cloud which can then sync with IFTTT and Pocket etc.

Maybe this particular design is not technically feasible or outright wrong, but I would be really grateful if someone with more expertise or nous could suggest an implementation or similar solution.

TL;DR

How can I sync Safari's 'reading list' URLs to Pocket/Evernote etc automagically?

Best Answer

I had this same idea a few months ago. I came up with a solution that works, using Ruby.

I use this gist to parse the Safari Reading List plist file: https://gist.github.com/andphe/3232343

Then I use the ruby Pocket gem to add each item to Pocket.

In the end, I went with Pinboard instead of Pocket, and I have a working project up on github that does exactly that, except using Pinboard.

The example code that you'd benefit from is: https://github.com/prokizzle/pinboard_tools/blob/master/lib/srl_to_pinboard.rb

What you'd ideally do to make it automatic is have Hazel monitor the Safari Reading List plist file for changes, and then run the ruby script if it's recently modified. That way, every item will make it from SRL to your read later service of choice.

Hope that helps.