Samstag, August 23, 2014

show open iCloud Tabs in shell

I've got the idea from this macstories post. In the attached Python script you find not only the location where the OS keeps the information. But also how to access it.

After I had a look at the man page for plutil I started my own test.
plutil -p ~/Library/SyncedPreferences/com.apple.Safari.plist
This will display the informatio in a JSON looking format.
plutil -convert xml1 -o /tmp/iCloudTabs2.xml  ~/Library/SyncedPreferences/com.apple.Safari.plist
Converts the information to XML. Don't miss the -o or it will overwrite the original file. Instead you could also use -e xml to write to a file with the new extension.

The output contains the device, URL, page title and more. If I find some information on the iPad and want to save, I keep the tap open. The next time at the Mac the URL to download this with curl or wget is already there.

Keine Kommentare: