packer

package
v0.0.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

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

func PackBundle(outputdir string, s grabber.Site, chapters []*DownloadedChapter, rng string) (string, error)

PackBundle packs a bundle of downloaded chapters

func PackSingle added in v0.0.7

func PackSingle(outputdir string, s grabber.Site, chapter *DownloadedChapter) (string, error)

PackSingle packs a single downloaded chapter

func SanitizeFilename added in v0.0.6

func SanitizeFilename(filename string) string

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL