BibTeX parser written in Go
Go
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
.travis.yml
LICENSE
README.md
decode.go
decode_test.go

README.md

GoDoc Build Status Coverage Status Go Report Card GitHub version license

gobibtex

BibTeX parser written in Go

install

$ go get github.com/sotetsuk/gobibtex

Usage

import "gobibtex"
import "github.com/k0kubun/pp"

bibstring := `@article{lecun2015deep,
                       title={Deep learning},
                       author={LeCun, Yann and Bengio, Yoshua and Hinton, Geoffrey},
                       journal={Nature},
                       volume={521},
                       number={7553},
                       pages={436--444},
                       year={2015},
                       publisher={Nature Publishing Group}
                      }`

bibmap, err := gobibtex.Decode(bibstring)
pp.Println(bibmap)

Output:

{
  "journal": "Nature",
  "number":  "7553",
  "pages":   "436--444",
  "title":   "Deep learning",
  "name":    "lecun2015deep",
  "author":  []string{
    "LeCun, Yann",
    "Bengio, Yoshua",
    "Hinton, Geoffrey",
  },
  "year":   "2015",
  "entry":  "article",
  "volume": "521",
}

License

MIT License