0.4.0 • Published 5 years ago
chrome-bookmark-reader v0.4.0
chrome-bookmark-reader
A library/cli to read Bookmarks of Google Chrome.
This library parses bookmark json files of Google Chrome and returns the result as a flat json object.
Requirements
- Node.js >= 12
Usage
As a library
npm install chrome-bookmark-readeryarn add chrome-bookmark-readerimport { getChromeBookmark } from 'chrome-bookmark-reader'
const path = '/path/to/Chrome/Bookmark'
const result = getChromeBookmark(path)
console.log(result)
// shows your bookmark contentsoption
const option = {
  shouldIncludeFolders: true,
}
const result = getChromeBookmark(path, option)- shouldIncludeFolders: If- true, results include bookmark folders (defaults to- false).
As a cli
npm install -g chrome-bookmark-readerchrome-bookmark --file "/path/to/Chrome/Bookmark" [--pattern "something"] [--output "text"]
# -> shows your bookmark contentsoptions
- --file(- -f): Required. Path to Chrome Bookmarks File (see below).
- --pattern(- -p): Optional. If specified, result is filtered by the given value.
- --output(- -o): Optional. Result is displayed according to this value. format. One of- "json"or- "text"is available. Defaults to- "json".
For detail, type chrome-bookmark --help.
Notice
If you are a mac user, you can find the bookmark json file at the following location:
- "/Users/{Username}/Library/Application Support/Google/Chrome/{Chrome Profile}/Bookmarks"
- Where are Google Chrome bookmarks stored in macOS for multiple profiles?
For windows, see following article.