added latest states

This commit is contained in:
m3philis
2025-04-03 15:34:00 +02:00
parent 14116309dd
commit 37edab5197
6 changed files with 49 additions and 16 deletions

View File

@@ -67,12 +67,11 @@ func main() {
fmt.Print(" Manga already completed!\n\n")
}
if _, err := os.Stat(strings.Join([]string{path, "EPUB", manga.Name + ".epub"}, "/")); err != nil || forceEpub || newChapter {
epubPath := strings.Join([]string{path, "EPUB"}, "/")
os.MkdirAll(epubPath, 0755)
if forceEpub || newChapter {
os.MkdirAll("/tmp/epub", 0755)
fmt.Println("Generating EPUB")
createepub.CreateEpub(mangaPath, epubPath, manga.Name, manga.ID)
fmt.Printf("EPUB created and saved under: %s\n\n", epubPath)
createepub.CreateEpub(mangaPath, manga.Name, manga.ID)
fmt.Printf("EPUB created and saved under: %s\n\n", "/tmp/epub")
} else {
fmt.Print("No update on manga, skipping epub creation!\n\n")
}