Documentation ¶
Index ¶
- Constants
- func ArchiveCBZ(filename string, files []*downloader.File) error
- func NewFilenameFromTemplate(templ string, parts FilenameTemplateParts) (string, error)
- func PackBundle(s grabber.Site, chapters []*DownloadedChapter, rng string) (string, error)
- func PackSingle(s grabber.Site, chapter *DownloadedChapter) (string, error)
- func SanitizeFilename(filename string) string
- type DownloadedChapter
- type FilenameTemplateParts
Constants ¶
View Source
const FilenameTemplateDefault = "{{.Series}} {{.Number}} - {{.Title}}"
FilenameTemplateDefault is the default filename template
Variables ¶
This section is empty.
Functions ¶
func ArchiveCBZ ¶
func ArchiveCBZ(filename string, files []*downloader.File) error
ArchiveCBZ archives the given files into a CBZ file
func NewFilenameFromTemplate ¶ added in v0.0.6
func NewFilenameFromTemplate(templ string, parts FilenameTemplateParts) (string, error)
NewFilenameFromTemplate returns a new filename from a series title, a chapter and a template
func PackBundle ¶ added in v0.0.7
PackBundle packs a bundle of downloaded chapters
func PackSingle ¶ added in v0.0.7
func PackSingle(s grabber.Site, chapter *DownloadedChapter) (string, error)
PackSingle packs a single downloaded chapter
func SanitizeFilename ¶ added in v0.0.6
SanitizeFilename sanitizes a filename
Types ¶
type DownloadedChapter ¶ added in v0.0.7
type DownloadedChapter struct { *grabber.Chapter Files []*downloader.File }
DownloadedChapter represents a downloaded chapter (a Chapter + Files)
type FilenameTemplateParts ¶ added in v0.0.6
type FilenameTemplateParts struct { // Series represents the series name (e.g. "One Piece") Series string // Number represents the chapter number (e.g. "1.0") Number string // Title represents the chapter title (e.g. "The Beginning") Title string }
FilenameTemplateParts represents the parts of a filename
func NewChapterFileTemplateParts ¶ added in v0.0.7
func NewChapterFileTemplateParts(title string, chapter *grabber.Chapter) FilenameTemplateParts
NewChapterFileTemplateParts returns a new FilenameTemplateParts from a title and a chapter
Click to show internal directories.
Click to hide internal directories.