Class: ChromeBookmarkParser
- Inherits:
-
BookmarkParser
- Object
- BookmarkParser
- ChromeBookmarkParser
- Defined in:
- lib/bookmarks.rb
Overview
Chrome/Chromium bookmark parser (JSON format)
Instance Attribute Summary
Attributes inherited from BookmarkParser
Instance Method Summary collapse
Methods inherited from BookmarkParser
Constructor Details
This class inherits a constructor from BookmarkParser
Instance Method Details
#parse ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/bookmarks.rb', line 81 def parse begin local_bookmarks = JSON.parse(File.read(@file_path)) @chrome_bookmarks = local_bookmarks["roots"]["bookmark_bar"]["children"] rescue puts "Warning: ".yel + "Bookmarks file not found or invalid." puts "Suggest: ".grn + "booker --install bookmarks" @chrome_bookmarks = [] return end parse_recursive end |