Documentation
¶
Index ¶
- func ExportBibtex(citations []Citation)
- func ExportJson(citations []Citation)
- func GetEntryType(resourceType string) string
- type Citation
- func (self *Citation) CopyFile(file string) string
- func (self *Citation) GetAuthorCitekey() string
- func (self *Citation) GetAuthorTui() string
- func (self *Citation) GetAuthorsSql(citAuthors []CitationAuthor) string
- func (self *Citation) GetCiteKey() string
- func (self *Citation) GetTitle() string
- func (self *Citation) GetYear() string
- func (self Citation) Print()
- type CitationAuthor
- type CitationShort
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEntryType ¶ added in v0.0.4
converts various resource types to a bibtex entry type https://www.bibtex.com/e/entry-types/ https://github.com/papis/papis/blob/master/papis/crossref.py
Types ¶
type Citation ¶
type Citation struct {
Address string // address
Author []CitationAuthor
Booktitle string // booktitle
Chapter string // chapter
Citekey string // citekey (generated)
Doi string // doi
Editor []CitationAuthor
File string // appended file
Howpublished string // how published
Institution string // institution
Id int // database id (generated)
Isbn string // isbn
Issn string // issn
Journal string // journal name
Number string // issue number
Organization string // organization
Pages string // pages
Publisher string // publisher
ResourceType string // needs to be converted to bibtex entry type
Series string // series
School string // school
Title string // title
Url string // doi url
UrlDate string // access date (generated)
Volume string // volume
Year string // year
}
the organized form of a citation
func ParseFromBibtex ¶
tries to parse a bibtex string to []Citation assumes a reasonably well formatted bibtex file https://www.bibtex.com/g/bibtex-format/
func (*Citation) GetAuthorCitekey ¶
returns author abbreviation for citekey
func (*Citation) GetAuthorTui ¶
returns short author string for TUI either:
family name (if one author), family and family (2 authors), family et al. (more authors)
func (*Citation) GetAuthorsSql ¶
func (self *Citation) GetAuthorsSql(citAuthors []CitationAuthor) string
returns authors as delimited string for the sql database
type CitationAuthor ¶
an author's family and given name
func ParseAuthorsSql ¶
func ParseAuthorsSql(authors string) []CitationAuthor
parses authors delimited string to []CitationAuthor
Click to show internal directories.
Click to hide internal directories.