chrome-bookmark-reader
v0.4.0
Published
A library/cli to read Bookmarks of Google Chrome.
Downloads
16
Readme
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-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
option
const option = {
shouldIncludeFolders: true,
}
const result = getChromeBookmark(path, option)
shouldIncludeFolders
: Iftrue
, results include bookmark folders (defaults tofalse
).
As a cli
npm install -g chrome-bookmark-reader
chrome-bookmark --file "/path/to/Chrome/Bookmark" [--pattern "something"] [--output "text"]
# -> shows your bookmark contents
options
--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.