All Projects → CCharlieLi → Bookmark Parser

CCharlieLi / Bookmark Parser

Licence: mit
Find and parse Firefox/Chrome bookmark HTML and jsonlz4 file into useable JSON object or export as JSON file.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Bookmark Parser

alfred-bookmarks
bookmark search with alfred workflow written in Go
Stars: ✭ 24 (-22.58%)
Mutual labels:  firefox, bookmark
mdash
⭐️ Lightweight new tab page for Chrome/Firefox, synced with your bookmarks
Stars: ✭ 19 (-38.71%)
Mutual labels:  firefox, bookmark
Floccus
☁️ Sync your bookmarks privately across browsers
Stars: ✭ 2,630 (+8383.87%)
Mutual labels:  bookmark, firefox
Nighttab
A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.
Stars: ✭ 598 (+1829.03%)
Mutual labels:  bookmark, firefox
X509
A PHP library for X.509 public key certificates, attribute certificates, certification requests and certification path validation.
Stars: ✭ 27 (-12.9%)
Mutual labels:  parser
D Prolog
A Prolog implementation in D language
Stars: ✭ 20 (-35.48%)
Mutual labels:  parser
Sol Profiler
CLI Tool to List & Store Solidity Smart Contract Methods Attributes
Stars: ✭ 20 (-35.48%)
Mutual labels:  parser
Onion Crawler
Tor website crawler (specific for Alphabay at the time)
Stars: ✭ 15 (-51.61%)
Mutual labels:  parser
Pbparser
Golang library for parsing protocol buffer (.proto) files
Stars: ✭ 30 (-3.23%)
Mutual labels:  parser
Bulkurlopener
Bulk URL Opener is an application that provides the user with multiple utilities to help with managing and using large amounts of urls
Stars: ✭ 29 (-6.45%)
Mutual labels:  firefox
Lfuzzer
Fuzzing Parsers with Tokens
Stars: ✭ 28 (-9.68%)
Mutual labels:  parser
Algebra Latex
Parse and calculate latex formatted math
Stars: ✭ 20 (-35.48%)
Mutual labels:  parser
Errorstacks
Tiny library to parse error stack traces
Stars: ✭ 29 (-6.45%)
Mutual labels:  parser
Protractor Firefox Support
Custom implementation of Actions class functions for e2e testing with Protractor in Firefox
Stars: ✭ 20 (-35.48%)
Mutual labels:  firefox
Ssp
C++ CSV parser
Stars: ✭ 30 (-3.23%)
Mutual labels:  parser
Singlefilez
Web Extension for Firefox/Chrome/MS Edge and CLI tool to save a faithful copy of an entire web page in a self-extracting HTML/ZIP polyglot file
Stars: ✭ 882 (+2745.16%)
Mutual labels:  firefox
Anglesharp.css
👼 Library to enable support for cascading stylesheets in AngleSharp.
Stars: ✭ 27 (-12.9%)
Mutual labels:  parser
Mysqllog
Lightweight MySQL slow query log parser in Go
Stars: ✭ 29 (-6.45%)
Mutual labels:  parser
Mkcert
A simple zero-config tool to make locally trusted development certificates with any names you'd like.
Stars: ✭ 33,022 (+106422.58%)
Mutual labels:  firefox
Marionette client
Mozilla's Gecko Marionette client in golang
Stars: ✭ 21 (-32.26%)
Mutual labels:  firefox

Bookmark

Build Status

Find and parse Firefox/Chrome bookmark HTML and jsonlz4 file into useable JSON object or export as JSON file.

Install

npm i bookmark-parser --save

yarn add bookmark-parser

Usage

Interfaces

const BMParser = require('bookmark-parser');

// Read from (NETSCAPE/Firefox) bookmark HTML file
BMParser.readFromHTMLFile(htmlFilePath)
  .then(res => { ... });

// Read from (NETSCAPE/Firefox) bookmark HTML file and export
BMParser.readFromHTMLFile(htmlFilePath, exportFilePath)
  .then(res => { ... });


// Read from (NETSCAPE/Firefox) bookmark HTML readStream
BMParser.readFromHTMLReadStream(readStream)
  .then(res => { ... });

// Read from (NETSCAPE/Firefox) bookmark HTML readStream and export
BMParser.readFromHTMLReadStream(readStream, exportFilePath)
  .then(res => { ... });

// Read from (Firefox backup) bookmark jsonlz4 file
BMParser.readFromJSONLZ4File(jsonlz4FilePath)
  .then(res => { ... });

// Read from (Firefox backup) bookmark jsonlz4 file and export
BMParser.readFromJSONLZ4File(jsonlz4FilePath, exportFilePath)
  .then(res => { ... });

// Find Firefox bookmark backup file in your system
BMParser.findFromLocalhost().then(res => { ... });

// Find Firefox bookmark backup file in your system and export
BMParser.findFromLocalhost(exportFilePath).then(res => { ... });

Result of parsing HTML bookmark

{
  "Bookmarks": {
    "id": "c2c584eb4059443592d05c97a02d1627",
    "prevNode": "[Circular ~]",
    "children": [
      {
        "addDate": "1496371119",
        "lastModified": "1496459142",
        "name": "Update Scanner's Pages",
        "type": "folder",
        "id": "c2c584eb4059443592d05c97a02d1627-1",
        "prevNode": "[Circular ~.Bookmarks]",
        "children": [
          {
            "addDate": "1496374759",
            "lastModified": "1496459142",
            "name": "Update Scanner Website",
            "type": "bookmark",
            "url": "https://addons.mozilla.org/firefox/addon/update-scanner/",
            "id": "c2c584eb4059443592d05c97a02d1627-1-1"
          }
        ]
      },
      {
        "addDate": "1496371160",
        "lastModified": "1496466717",
        "name": "Bookmarks Toolbar",
        "type": "folder",
        "id": "c2c584eb4059443592d05c97a02d1627-2",
        "description": "添加到此文件夹的书签会被显示到书签工具栏中",
        "prevNode": "[Circular ~.Bookmarks]",
        "children": [
          {
            "addDate": "1496371179",
            "lastModified": "1496466729",
            "name": "Charlie's blog",
            "type": "bookmark",
            "url": "http://www.charlieli.cn/",
            "id": "c2c584eb4059443592d05c97a02d1627-2-1",
            "iconUri": "",
            "icon": "",
            "description": "META_DESCRIPTION"
          },
          {
            "addDate": "1489373938",
            "lastModified": "1496456537",
            "name": "Front",
            "type": "folder",
            "id": "c2c584eb4059443592d05c97a02d1627-2-2",
            "prevNode": "[Circular ~.Bookmarks.children.1]",
            "children": [
              {
                "addDate": "1489545113",
                "lastModified": "1489557898",
                "name": "Nucleo",
                "type": "bookmark",
                "url": "https://nucleoapp.com/",
                "id": "c2c584eb4059443592d05c97a02d1627-2-2-1",
                "iconUri": "https://nucleo1-ambercreativelab.netdna-ssl.com/wp-content/themes/nucleo-webapp-12/img/favicon.ico",
                "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAB3klEQVRYhe3Xv27aUBQG8G9uBTZI/WOT7kkX7L4A5gEoNi+BmA2d4lgFx7FjbPw+IU8QsoYMSFiRKCytkif4OkDSdqhiEidupQzfes9POveeqwMArwD4ABIA358pCYDjTW34AJhTAgBY5Aj4BgDXOQJusOlJXoAfL4D/E1ASK1SqDWq1NrVam0q1wVKp8vQAQXhPQ+/zYP+MgTfnKFxyFC4ZeHPa1oSGPqAgSE8DkKRdds0TxtGK/tGMrnPJw8EFDwcXdJ1L+kczxtGKPXNMWd7LFlAovGHXPGE0XNwV/Vui4YI9c8xi8V12AL35lXG0urf4beJoRUPvZwMQRZkH+2f03FlqgOfOaFuTNBfzfoBSbfDYm9N1pqkBrjNl4M+pKs3HA7Ram6Nwmbr4XRvCJetaJxtAnCdAqX5+YAsSqmoGLRDFCm1r8sBLuJPNMzT0/tbPsKUPspsDxcJb9sxx+kHUPaUgZDiIAFCS9tgzx7+N4ukfPffc9Sj+0j2lLH9MU3w7AACKgsSW4dC2zhn4ya/PyE9oW+dsGQ5FUU5bfHvAbcqlHapKk3Wtw7rW4Se1yXL5w1ZnPAqQYV4A/wYgz8XkGsh3NVsA6wUxL0AIrFfkAMDVpifPkSsAQwCvfwKIVTuEZS4vqQAAAABJRU5ErkJggg==",
                "description": "A library of 1000+ vector icons and a web app to manage and customize them."
              },
              {
                "addDate": "1489545098",
                "lastModified": "1489557897",
                "name": "you-dont-need/You-Dont-Need-Javascript: Css is powerful, you can do a lot of things without js.",
                "type": "bookmark",
                "url": "https://github.com/you-dont-need/You-Dont-Need-Javascript",
                "id": "c2c584eb4059443592d05c97a02d1627-2-2-2",
                "iconUri": "https://assets-cdn.github.com/favicon.ico",
                "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADC0lEQVRYhb2Wv2tUQRDHv9Fwefdul535zp7GRrGz9RcoiEIK/wdBjBhFOwsVxMI/wMbSQrSyiWKwE0t/NHbRIoURJdqI2iRBBZVocxeez93L5XI68Jo3M/v5zuzOvgf0b9F7P2Uid8zsZTRb3tpu/9rabv+KZstm9tJE7njvpwDEdazb28qy3E1y2sgfXeBaj5E/SE6XZbl7YLCqBpI3jVzpF5wQskLypqqGdVcdyTeDgutPJN/03Q3n3ISRi8OCV7qx6Jyb6AkPIez9F/CqiBDC3hxcjXxbS5gz8v4gooxc7OTO1d6/DSHoXwKMvF1fRFWPd9xj3vupaPahOnYUeUyRx9WxjGYfOqM4BgCqejwh7nb90O1LVVGW5Z5qnKqGRqOxC8CmRBM3NRqNXfUTX5blnsza+6rVz2SC9vc8NH1YWZb7M1s0040ZN/JnKkhEJjcqQEQmMwJ+AhiHOnc2FdAm3wPgRgUAIMl3KYY6dxYkp1NO7/2pIcABAN77UykGyWnUx6TbnnVfnz1MVUNqm42cQzT7+pfDbGFY8K6Z2UKdE82+ItWaaDY/bAHR7HWKlRRg5NKwBRi5lBSQdQBbhsjfki00isxm7oATw6KLyInkVovMguStjPMFgNEh8EejyIvMGN6CtlrHUs5OwPWN0klez62vrdYxAPDR7EsuyMh7AMYHYG8z8l5u3Wj2BYAHAKjqjVVVqtecc0co8qQi4nubvMsQznS+YpsTwFHfbB5U584ZOWPk9xy8w7mxmqmq26PZtw5shSIXAIwZ+TzRkRkAIwkBIybyoBe0Uv03Vd3+R7aIXK0GNZvNA0VR7Kx/SFT1UK7nzrnD/QgQkaup/FGSzyqVPupq895PqeqVVqt1NNP+rrXXgpN8hh7TNV69MkXkfA9YymSN1r/GWge6KIod0Wx+NSnGpxrCJe/9SVW9DKAYREA0my+KYke/lZDkw8wVLesVQPIhBvi5GWEIp6PZx0EFRPITQziD9NT0bY4iF8zslZGf0fndztiYkZ/N7BVDuAjAbQT8X+w36KQvZccCoxkAAAAASUVORK5CYII=",
                "description": "You-Dont-Need-Javascript - Css is powerful, you can do a lot of things without js."
              },
              {
                "addDate": "1489490961",
                "lastModified": "1489557904",
                "name": "Markdown.css - make HTML look like plain-text",
                "type": "bookmark",
                "url": "http://mrcoles.com/demo/markdown-css/",
                "id": "c2c584eb4059443592d05c97a02d1627-2-2-3"
              },
              {
                "addDate": "1489488225",
                "lastModified": "1489557893",
                "name": "gaearon/redux",
                "type": "bookmark",
                "url": "https://github.com/gaearon/redux",
                "id": "c2c584eb4059443592d05c97a02d1627-2-2-4",
                "iconUri": "https://assets-cdn.github.com/favicon.ico",
                "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADC0lEQVRYhb2Wv2tUQRDHv9Fwefdul535zp7GRrGz9RcoiEIK/wdBjBhFOwsVxMI/wMbSQrSyiWKwE0t/NHbRIoURJdqI2iRBBZVocxeez93L5XI68Jo3M/v5zuzOvgf0b9F7P2Uid8zsZTRb3tpu/9rabv+KZstm9tJE7njvpwDEdazb28qy3E1y2sgfXeBaj5E/SE6XZbl7YLCqBpI3jVzpF5wQskLypqqGdVcdyTeDgutPJN/03Q3n3ISRi8OCV7qx6Jyb6AkPIez9F/CqiBDC3hxcjXxbS5gz8v4gooxc7OTO1d6/DSHoXwKMvF1fRFWPd9xj3vupaPahOnYUeUyRx9WxjGYfOqM4BgCqejwh7nb90O1LVVGW5Z5qnKqGRqOxC8CmRBM3NRqNXfUTX5blnsza+6rVz2SC9vc8NH1YWZb7M1s0040ZN/JnKkhEJjcqQEQmMwJ+AhiHOnc2FdAm3wPgRgUAIMl3KYY6dxYkp1NO7/2pIcABAN77UykGyWnUx6TbnnVfnz1MVUNqm42cQzT7+pfDbGFY8K6Z2UKdE82+ItWaaDY/bAHR7HWKlRRg5NKwBRi5lBSQdQBbhsjfki00isxm7oATw6KLyInkVovMguStjPMFgNEh8EejyIvMGN6CtlrHUs5OwPWN0klez62vrdYxAPDR7EsuyMh7AMYHYG8z8l5u3Wj2BYAHAKjqjVVVqtecc0co8qQi4nubvMsQznS+YpsTwFHfbB5U584ZOWPk9xy8w7mxmqmq26PZtw5shSIXAIwZ+TzRkRkAIwkBIybyoBe0Uv03Vd3+R7aIXK0GNZvNA0VR7Kx/SFT1UK7nzrnD/QgQkaup/FGSzyqVPupq895PqeqVVqt1NNP+rrXXgpN8hh7TNV69MkXkfA9YymSN1r/GWge6KIod0Wx+NSnGpxrCJe/9SVW9DKAYREA0my+KYke/lZDkw8wVLesVQPIhBvi5GWEIp6PZx0EFRPITQziD9NT0bY4iF8zslZGf0fndztiYkZ/N7BVDuAjAbQT8X+w36KQvZccCoxkAAAAASUVORK5CYII=",
                "description": "redux - Atomic Flux with hot reloading"
              }
            ]
          }
        ]
      }
    ]
  }
}

Change log

TODO

  • [x] Parse Firefox jsonlz4 bookmark backup file
  • [x] Parse Firefox/Chrome html bookmark file
  • [x] Find and Parse Firefox jsonlz4 file on MacOS
  • [x] Export bookmark into json file
  • [ ] Option for deduplication
  • [ ] Find and Parse Firefox jsonlz4 file on Windows/Linux
  • [ ] Find and Parse Chrome bookmark backup file on Windows/Linux/MacOS

License

Copyright 2017 [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].