Class: Booker::Parsers::Chrome
Overview
Chrome/Chromium bookmark parser (JSON format)
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Booker::Parsers::Base
Instance Method Details
#parse ⇒ Object
51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/booker/parsers.rb', line 51 def parse begin local_bookmarks = JSON.parse(File.read(@file_path)) @chrome_bookmarks = local_bookmarks["roots"]["bookmark_bar"]["children"] rescue warn "Warning: ".yel + "Bookmarks file not found or invalid." warn "Suggest: ".grn + "booker --install bookmarks" return end parse_recursive end |