Documentation ¶
Overview ¶
Package bibtex is a quick and dirty BibTeX parser for working with a Bibtex citation
@author R. S. Doiel, <rsdoiel@caltech.edu>
Copyright (c) 2016, Caltech All rights not granted herein are expressly reserved by Caltech.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index ¶
- Constants
- func Bib(token *tok.Token, buf []byte) (*tok.Token, []byte)
- func Contains(elemList []*Element, target *Element) bool
- func Equal(elem1, elem2 *Element) bool
- func NotEqual(elem1, elem2 *Element) bool
- type ByKey
- type Element
- func Clone(elem *Element) *Element
- func Diff(elemList1, elemList2 []*Element) []*Element
- func Exclusive(elemList1, elemList2 []*Element) []*Element
- func Intersect(elemList1, elemList2 []*Element) []*Element
- func Join(elemList1, elemList2 []*Element) []*Element
- func Parse(buf []byte) ([]*Element, error)
- type Elements
- type TagTypes
Constants ¶
const ( // Version of BibTeX package Version = `v0.0.8` // LicenseText holds the text for displaying license info LicenseText = `` /* 1530-byte string literal not displayed */ // DefaultInclude list DefaultInclude = "" /* 150-byte string literal not displayed */ // A template for printing an element ElementTmplSrc = `` /* 132-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
func Bib ¶
Bib is a niave BibTeX Tokenizer function Note: there is an English bias in the AlphaNumeric check
Types ¶
type ByKey ¶ added in v0.0.6
type ByKey []string
ByKey struct is for sorting Element Keys
type Element ¶
type Element struct { XMLName xml.Name `json:"-"` ID string `xml:"id" json:"id"` Type string `xml:"type" json:"type"` Keys []string `xml:"keys" json:"keys"` Tags map[string]string `xml:"tags" json:"tags"` }
Generic Element
func Diff ¶ added in v0.0.6
Diff creates a new Element Array of all the elements in elemList1 an not in elemList2
func Exclusive ¶ added in v0.0.6
Exclusive create a new Element Array with elements that only exist in elemList1 or elemList2
func Intersect ¶ added in v0.0.6
Intersect create a new Element Array of elements in both elemList1 and elemList2
func Join ¶ added in v0.0.6
Join create a new Element array by combining to Element arrays without creating duplicate entries
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
bibfilter
bibfilter reads a bibfile and writes it out.
|
bibfilter reads a bibfile and writes it out. |
bibmerge
bibset reads in two bibfiles and writes out new one based on operation selected (e.g.
|
bibset reads in two bibfiles and writes out new one based on operation selected (e.g. |
bibscrape
bibscrape - scrape a plain text file and render a pseudo BibTeX record that will import into JabRef.
|
bibscrape - scrape a plain text file and render a pseudo BibTeX record that will import into JabRef. |
bibtex/scrape.go is a plain text scraping package related to creating BibTeX output @author R. S. Doiel, <rsdoiel@caltech.edu> Copyright (c) 2016, Caltech All rights not granted herein are expressly reserved by Caltech.
|
bibtex/scrape.go is a plain text scraping package related to creating BibTeX output @author R. S. Doiel, <rsdoiel@caltech.edu> Copyright (c) 2016, Caltech All rights not granted herein are expressly reserved by Caltech. |
Package tok is a niave tokenizer @author R. S. Doiel, <rsdoiel@caltech.edu> Copyright (c) 2016, Caltech All rights not granted herein are expressly reserved by Caltech.
|
Package tok is a niave tokenizer @author R. S. Doiel, <rsdoiel@caltech.edu> Copyright (c) 2016, Caltech All rights not granted herein are expressly reserved by Caltech. |
webapp.go a Web Application of bibtex package @author R. S. Doiel, <rsdoiel@caltech.edu> Copyright (c) 2016, Caltech All rights not granted herein are expressly reserved by Caltech.
|
webapp.go a Web Application of bibtex package @author R. S. Doiel, <rsdoiel@caltech.edu> Copyright (c) 2016, Caltech All rights not granted herein are expressly reserved by Caltech. |