Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SnakeCaseGenerator ¶
SnakeCaseGenerator is generates a snake-case file name from the Article title. All punctuation, spaces and control codes are replaced by '_'s, which are squeezed. No extension is added to the file name.
Types ¶
type Article ¶
type Article struct {
Handle Handle // article identifier DOI, ISBN, ISSN...
DOI string
Title string
Url *url.URL // PDF download link
Citation []byte
// contains filtered or unexported fields
}
The Article holds data needed to download and write the article to disc. The DOI is used to fetch the title and PDF URL from Sci-Hub.
func (*Article) GenerateFileName ¶
GenerateFileName generates and caches the file name of the article.
func (*Article) GeneratorFunc ¶
func (a *Article) GeneratorFunc(g fileNameFunc)
GeneratorFunc assigns a new generator
type Handle ¶
type Handle struct {
Value string
Type HandleType
}
Click to show internal directories.
Click to hide internal directories.