Anyone know if there is a way to search Reading List?
Not necessarily the full text of the pages — but at least the titles/descriptions that you see when looking at the Reading List pane within Safari:
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.
Sign up to join this communityAnyone know if there is a way to search Reading List?
Not necessarily the full text of the pages — but at least the titles/descriptions that you see when looking at the Reading List pane within Safari:
I am not aware of any options in Safari. Neither the search option under Help, nor the search option under All Bookmarks yielded any results.
But, OSX's Spotlight did index the reading list: Results appear in the section Webpages.
First I added the webpage to the reading list. Then I reset Safari.
And voilà, Spotlight found it. Not the best solution, but the best I found.
.webhistory
files in ~/Library/Caches/Metadata/Safari/History
. Try to add this folder to your search scope in Alfred Preferences > Features.
– gentmatt
Mar 5 '12 at 17:48
Create an AppleScript .scpt or Automator Service workflow and assign it a shortcut key.
The following script opens your default editor's window with the search results. A bit kludgy, and if the search string is in the Preview field but isn't in the URL you'll get back the line from the Preview field but not the URL. Might be possible to code round that with awk, but I haven't got round to figuring it out yet. Otherwise it works quite well.
--AppleScript
display dialog ("Enter the string to search for: ") default answer "Search Safari Reading List" buttons {"Cancel", "Search"} default button 2
set searchTerm to the text returned of the result
do shell script "strings ~/Library/Safari/Bookmarks.plist | grep -i '" & searchTerm & "' | awk '{ print FNR \"t\" $0}' | open -f"
--EOF
(Note: you need to scroll right to see the end of the final line. From 'do shell script.... to ....open -f" ' is all ONE line).
You should see something like this after hitting "Search" (obviously your results will differ from mine!)
defaults read ~/Library/Safari/Bookmarks.plist | sed -En 's/.*URLString = "(.*)";/\1/p' | grep -F "$searchTerm"
– Lri
Apr 9 '13 at 12:35
/usr/libexec/PlistBuddy -c print ~/Library/Safari/Bookmarks.plist | sed -En 's/^ *(URLString|PreviewText) = (.*)/\2/p' | paste - - | grep -Ei searchphrase | cut -f1
. PlistBuddy prints non-ASCII characters as literal characters instead of escape sequences.
– Lri
Apr 10 '13 at 7:53