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.
- Node.js >= 12
npm install chrome-bookmark-reader
yarn add chrome-bookmark-reader
import { getChromeBookmark } from 'chrome-bookmark-reader'
const path = '/path/to/Chrome/Bookmark'
const result = getChromeBookmark(path)
console.log(result)
// shows your bookmark contents
const option = {
shouldIncludeFolders: true,
}
const result = getChromeBookmark(path, option)
shouldIncludeFolders
: Iftrue
, results include bookmark folders (defaults tofalse
).
npm install -g chrome-bookmark-reader
chrome-bookmark --file "/path/to/Chrome/Bookmark" [--pattern "something"] [--output "text"]
# -> shows your bookmark contents
--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
.
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.