Advertisement
Guest User

Untitled

a guest
Jul 7th, 2015
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. #!/bin/bash
  2. # Script to export Safari's reading list into a text file, then import this into Pocket or Evernote (or any service with a "email in content" feature).
  3.  
  4. # First take all of Safari's Reading List items and place them in a text file.
  5. /usr/bin/plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | grep -E -o '<string>http[s]{0,1}://.*</string>' | grep -v icloud | sed -E 's/<\/{0,1}string>//g' > readinglistlinksfromsafari.txt
  6.  
  7. # Now loop over each of those URls within that text file and add them to pocket.
  8. while IFS= read -r line
  9. do
  10. #echo $line
  11. /usr/sbin/sendmail -i -f myemail@gmail.com add@getpocket.com <<END
  12. Subject: $line
  13. From: myemail@gmail.com
  14. To: add@getpocket.com
  15. $line
  16. END
  17. #echo ".\c"
  18. done < readinglistlinksfromsafari.txt
  19. #echo ""
  20.  
  21. #~/Dropbox/rtf2html.pl -noimages ~/infilertf2html.txt | ~/Dropbox/geturls.pl | sort -u | ~/Dropbox/urls2pocket.pl
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement