chrome-bookmark-reader
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

chrome-bookmark-reader

Typescript npm version Actions Status License: MIT

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: If true, results include bookmark folders (defaults to false).

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:

For windows, see following article.

Related repositories

Readme

Keywords

Package Sidebar

Install

npm i chrome-bookmark-reader

Weekly Downloads

0

Version

0.4.0

License

MIT

Unpacked Size

21.2 kB

Total Files

16

Last publish

Collaborators

  • ytakahashi