ytakahashi / chrome-bookmark-reader

A library/cli to read Bookmarks of Google Chrome.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

A library/cli to read Bookmarks of Google Chrome.

License:MIT License


Languages

Language:TypeScript 99.3%Language:JavaScript 0.7%