Skip to content

Parse Firefox/Chrome/IE/Safari HTML bookmarks files

License

Notifications You must be signed in to change notification settings

zxhycxq/bookmark-file-parser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bookmark-file-parser

Parse Firefox/Chrome/IE/Safari HTML bookmarks files

install

npm i bookmark-file-parser -S

use

import { parseByPath, parseByString } from "bookmark-file-parser"
import { readFileSync } from "fs"

const dirname = "./chrome.html"

const data1 = parseByPath(dirname)

const content = readFileSync(dirname, "utf-8")
const data2 = parseByString(content)

output

[{
    "name": "chrome",
    "type": "folder",
    "href": "",
    "icon": "",
    "children": [{
        "name": "google",
        "type": "site",
        "href": "https://www.google.com/",
        "icon": "",
        "children": []
    }]
}]  

About

Parse Firefox/Chrome/IE/Safari HTML bookmarks files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 93.8%
  • JavaScript 3.6%
  • TypeScript 2.6%