Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hold-baby/bookmark-file-parser
Parse Firefox/Chrome/IE/Safari HTML bookmarks files
https://github.com/hold-baby/bookmark-file-parser
bookmark bookmark-parse bookmark-parser
Last synced: about 1 month ago
JSON representation
Parse Firefox/Chrome/IE/Safari HTML bookmarks files
- Host: GitHub
- URL: https://github.com/hold-baby/bookmark-file-parser
- Owner: hold-baby
- License: mit
- Created: 2019-12-06T02:18:03.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T15:27:36.000Z (about 2 years ago)
- Last Synced: 2024-04-25T11:03:09.768Z (9 months ago)
- Topics: bookmark, bookmark-parse, bookmark-parser
- Language: HTML
- Size: 823 KB
- Stars: 22
- Watchers: 2
- Forks: 4
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- project-awesome - hold-baby/bookmark-file-parser - Parse Firefox/Chrome/IE/Safari HTML bookmarks files (HTML)
README
# bookmark-file-parser
Parse Firefox/Chrome/IE/Safari HTML bookmarks files## install
```cmd
npm i bookmark-file-parser -S
```
## use
```javascript
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
```javascript
[{
"name": "chrome",
"type": "folder",
"href": "",
"icon": "",
"children": [{
"name": "google",
"type": "site",
"href": "https://www.google.com/",
"icon": "",
"children": []
}]
}]
```