gobibtex

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2016 License: MIT Imports: 3 Imported by: 1

README

GoDoc Build Status Coverage Status 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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(bibstring string) (bibmap map[string]interface{}, err error)

Decode bibtex string to map.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL