Documentation ¶
Index ¶
- Variables
- func CompilePathTemplate(t string, subs ...PathTemplateSub) func(b *audible.Book) string
- func InitShutdownSignals(ctx context.Context) context.Context
- func ListDownloadedBooks(dir string) ([]*audible.Book, error)
- func WriteInfoFile(dir string, book *audible.Book) error
- type PathTemplateSub
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultPathTemplate = filepath.Join("%AUTHOR%", "%SHORT_TITLE%", "%TITLE%.mp4")
View Source
var SampleBook = audible.Book{ Title: "A Basic Book Title: And subtitle", Authors: []string{"First Author", "Second Author", "Third Author"}, }
Functions ¶
func CompilePathTemplate ¶
func CompilePathTemplate(t string, subs ...PathTemplateSub) func(b *audible.Book) string
CompilePathTemplate combines given template and PathTemplateSub fns into a fn taking an *audible.Book and returning the destination path
Types ¶
type PathTemplateSub ¶
func PathTemplateAuthor ¶
func PathTemplateAuthor(max int, sep string) PathTemplateSub
func PathTemplateShortTitle ¶
func PathTemplateShortTitle() PathTemplateSub
func PathTemplateTitle ¶
func PathTemplateTitle() PathTemplateSub
Click to show internal directories.
Click to hide internal directories.