Class: Pincerna::ChromeBookmark
Overview
Show the list of Chrome bookmarks.
Constant Summary
- ICON =
The icon to show for each feedback item.
Pincerna::Base::ROOT + "/images/chrome.png"
- BOOKMARKS_DATA =
The location of the bookmarks data
File.("~/Library/Application Support/Google/Chrome/Default/Bookmarks")
Constants inherited from Bookmark
Bookmark::MATCHER, Bookmark::SEPARATOR
Constants inherited from Base
Base::CACHE_ROOT, Base::FULL_NAME, Base::MATCHER, Base::RELEVANT_MATCHES, Base::ROOT, Base::TYPES, Base::WORKFLOW_ROOT
Instance Attribute Summary
Attributes inherited from Base
#format, #format_content_type, #output
Instance Method Summary (collapse)
-
- (Object) read_bookmarks
Reads the list of Chrome Bookmarks.
Methods inherited from Bookmark
#perform_filtering, #process_results
Methods inherited from Base
#add_feedback_item, execute!, #filter, #format_float, #initialize, #output_feedback, #perform_filtering, #process_results, #round_float
Constructor Details
This class inherits a constructor from Pincerna::Base
Instance Method Details
- (Object) read_bookmarks
Reads the list of Chrome Bookmarks.
17 18 19 20 21 22 23 24 25 |
# File 'lib/pincerna/chrome_bookmark.rb', line 17 def read_bookmarks data = File.read(BOOKMARKS_DATA) rescue nil if data then Oj.load(data)["roots"].each do |_, root| scan_folder(root, "") if root.is_a?(Hash) end end end |