suhodolskiy / netscape-bookmarks

πŸ“š Golang library to work with bookmark export files in Netscape bookmark format

Home Page:https://pkg.go.dev/github.com/suhodolskiy/netscape-bookmarks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ“š 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)

About

πŸ“š Golang library to work with bookmark export files in Netscape bookmark format

https://pkg.go.dev/github.com/suhodolskiy/netscape-bookmarks

License:MIT License


Languages

Language:Go 83.9%Language:HTML 16.1%