Created
June 15, 2012 11:26
-
-
Save manufaktor/2935965 to your computer and use it in GitHub Desktop.
Extracting links from your Safari Reading List
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Extracting links from your Safari Reading List | |
# | |
# Copy your Safari Bookmarks file first: | |
# cp ~/Library/Safari/Bookmarks.plist | |
# | |
# Convert the binary plist to xml | |
# plutil -convert xml1 Bookmarks.plist | |
# | |
# install the plist gem | |
# gem install plist | |
# | |
require 'plist' | |
content = Plist::parse_xml('Bookmarks.plist') | |
links = content['Children'][4]['Children'].map { |hash| hash['URLString'] } | |
puts links |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment