Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 1.12 KB

README.md

File metadata and controls

42 lines (27 loc) · 1.12 KB

📚 Netscape Bookmarks

Golang library to work with bookmark export files in Netscape bookmark format.

Go Reference

Install

go get github.com/suhodolskiy/netscape-bookmarks

Usage

Convert bookmark export file to golang structs

package main

import (
  ...

  bookmarks "github.com/suhodolskiy/netscape-bookmarks"
)

func main() {
  input, _ := os.OpenFile("./example.html", os.O_RDONLY, 0644)
  data, _ := bookmarks.Parse(input)
  fmt.Println("Result", data)
}

Command line tool

go run cmd/conver/main.go --input ./example.html --output ./example.json

  1. Input file: bookmarks/example.html
  2. Output file: bookmarks/result.json

Todo

  • Add the ability to generate a bookmark file
  • Add the ability to convert HTML file to other formats (YAML, XML)