News for hackers. Stuff that matters.
Re:Instapaper is joining Pinterest by derefr on Tuesday August 23, 2016 @01:48PM (#12345735)
I use Mobile Safari on iOS but Chrome on macOS. This means that, as much as I love Safari's Reading List, it's basically "unavailable" to me on the desktop. To put something in the Reading List from Chrome, I have to focus the URL bar, copy the URL, open Safari, paste and go to the URL, and then ⌘⇧D to put it in the list. (I can also right-click on the URL bar in Chrome and use the "Add to Reading List" OS Service, but the mousing involved is actually nearly as much work as the series of keyboard-gestures in the above.)

The fact that there's no way to get anything to actively sync between Chrome and iCloud is maddening. Why has nobody reverse-engineered the iCloud API and made a Chrome extension to talk to it?

Re:Instapaper is joining Pinterest by pcl on Tuesday August 23, 2016 @01:52PM (#12345778)
I've recently switched my primary browsing back to Safari on my 2012-era MacBook Air. Battery life is noticeably better.

I still launch Chrome and FF regularly for development, but my tab-hell lives in Safari now.

Re:Instapaper is joining Pinterest by freehunter on Tuesday August 23, 2016 @04:43PM (#12347442)
Oh man other browsers kill the battery compared to Safari. It's not even a comparison.
Re:Instapaper is joining Pinterest by tedmiston on Tuesday August 23, 2016 @04:06PM (#12347077)
Plug: OneTab for Chrome or Pinboard > Save tab set (in Chrome/Safari) are my best routes out of tab hell.

I find Safari often becomes unusable with 30–50 tabs.

Re:Instapaper is joining Pinterest by aroch on Tuesday August 23, 2016 @01:53PM (#12345788)
If you use Alfred, you can setup a workflow (edit, this is the one I've used in the past and works currently: http://www.alfredforum.com/topic/4524-safari-reading-list/ ) to do this with a key combo
Re:Instapaper is joining Pinterest by jen729w on Tuesday August 23, 2016 @07:36PM (#12348642)
I go the other way, sending pages from Safari to Chrome when I need Flash content, using a TextExpander snippet. It's not a perfect solution for you, but it might help.

Here's the code, which I have tied to "stc " (send to Chrome). [Ha! In typing the snippet shortcut, of course, I sent this very page to Chrome. :-)]

  property theURL : ""
  tell application "Safari"
  	set theURL to URL of current tab of window 1
  end tell
  if appIsRunning("Google Chrome") then
  	tell application "Google Chrome"
  		make new window
  		set URL of active tab of window 0 to theURL
  		activate
  	end tell
  else
  	tell application "Google Chrome"
  		do shell script "open -a \"Google Chrome\""
  		set URL of active tab of window 0 to theURL
  		activate
  	end tell
  end if
  
  on appIsRunning(appName)
  	tell application "System Events" to (name of processes) contains appName
  end appIsRunning
Re:Instapaper is joining Pinterest by tedmiston on Tuesday August 23, 2016 @04:04PM (#12347065)
Slightly easier — click and hold in the URL bar and drag to the Safari icon.

I also wrote a short AppleScript called Tab Transporter to move tabs between browsers. It's configured to go from Safari to Chrome but you could reverse that easily. I activate it via Alfred.

https://github.com/tedmiston/tab-transporter

Re:Instapaper is joining Pinterest by NaOH on Tuesday August 23, 2016 @07:08PM (#12348502)
I only use Safari, so I can't test if this still works, but have a look at this Stack Exchange thread on sending a non-Safari tab to Safari Reading List

http://apple.stackexchange.com/questions/51534/reading-list-...

Re:Instapaper is joining Pinterest by jonknee on Tuesday August 23, 2016 @02:46PM (#12346354)
> Why has nobody reverse-engineered the iCloud API and made a Chrome extension to talk to it?

If you can reverse engineer iCloud and bypass its security there are a lot more lucrative pursuits than making a Chrome extension for your reading list.

Re:Instapaper is joining Pinterest by derefr on Tuesday August 23, 2016 @02:51PM (#12346408)
Who said anything about bypassing security? I was presuming the extension would just "walk in the front door" by getting the user to log into it with their iCloud credentials, and then passing those to the server. Or are you saying that the iCloud protocols are obfuscated/DRMed above-and-beyond just having regular AAA constraints applied to them?
Re:Instapaper is joining Pinterest by jonknee on Tuesday August 23, 2016 @03:47PM (#12346883)
iCloud is not a free for all, it's meant to share data within your app or within your org's group of apps (e.g. all Google apps). The Reading List data is within Apple's own container and you would not have access to it through conventional tools.

This is typically a good thing because syncing is hard enough when you control both ends, having arbitrary programs messing with your data is a recipe for disaster.

Re:Instapaper is joining Pinterest by derefr on Tuesday August 23, 2016 @05:07PM (#12347638)
Ah, this is what had me confused: I was assuming that the parts of "iCloud" that preceded the creation of the Ubiquity sync protocol (e.g. Safari bookmark sync, Notes and Reminders, Calendars, etc.) just stayed WebDAV-based with their CoreData databases being purely local+ephemeral, rather than migrating over into using full-on Ubiquity-synced CoreData stores. (I swear you can still export e.g. CalDAV calendar URLs from Calendars.app for iCloud calendars, and these CalDAV resources are writable if you want them to be. Or am I misremembering?)

Still, even with the way iCloud works, you don't need to directly prod the data. If you want to manipulate Safari's container, you can prod Safari itself into doing so. OSA is no COM, but it works just fine for this sort of thing. (And if you can't manage to make it do so, you can write a Safari plug-in presenting a locally-bound HTTP API that the Chrome extension can talk to.)

Now, the real challenge would be doing this syncing as part of some "syncing service" running on a cloud VM somewhere, that doesn't actually want to run thousands of headless copies of Safari. That's what I really want: the ability to sync Chrome with iCloud even if I currently have no active iCloud-attached devices. Probably the simplest way to do this is to write your own Ubiquity+CoreData client libraries and present yourself as another device that wants to sync against the iCloud account. It'd be up to you from there to safely munge the CoreData object hierarchy in a way resembling the official clients, but at least you'd be able to linearize those updates against iCloud messages.