Documentation ¶
Overview ¶
Package citeproc_js_go
Package citeproc_js_go implements the integration of citeproc-js with Go. Citeproc-js is a JavaScript implementation of the Citation Style Language (CSL) that is used to format bibliographic references.
The package allows the user to pass in a CSL file and a locales file, or if not provided, use the default files included in the package.
Index ¶
- type Session
- func (s *Session) AddCitation(items ...csljson.Item) error
- func (s *Session) Init() (err error)
- func (s *Session) MakeBibliography() ([]string, error)
- func (s *Session) ProcessCitationCluster(items ...csljson.Item) (string, error)
- func (s *Session) SetCslContent(cslContent string)
- func (s *Session) SetCslFile(cslFilePath string) error
- func (s *Session) SetLocaleContent(localeContent string)
- func (s *Session) SetLocaleFile(localeFilePath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session is a struct that stores information about the Citeproc session.
func (*Session) AddCitation ¶ added in v1.0.0
func (*Session) Init ¶
Init initializes the Citeproc session by loading required files and setting up the runtime.
func (*Session) MakeBibliography ¶
MakeBibliography processes the bibliography items stored in the current session and returns a slice of strings containing the formatted bibliography entries.
func (*Session) ProcessCitationCluster ¶
ProcessCitationCluster processes a citation cluster and returns the resulting string that should be placed in the text at the place of the citation.
func (*Session) SetCslContent ¶
SetCslContent sets the content of the CSL file for the session.
func (*Session) SetCslFile ¶
SetCslFile sets the content of the CSL file for the session.
func (*Session) SetLocaleContent ¶
SetLocaleContent sets the content of the locale file for the session.
func (*Session) SetLocaleFile ¶
SetLocaleFile sets the content of the locale file for the session.