Compare commits
2 Commits
65e2c9f051
...
eaa23d67dc
Author | SHA1 | Date |
---|---|---|
Felipe M | eaa23d67dc | |
Felipe M | 21c9631483 |
|
@ -1,3 +1,3 @@
|
|||
# MangaDex to CBR downloader
|
||||
# MangaDex to Comic Book downloader
|
||||
|
||||
Generate CBR comics from MangaDex releases
|
||||
Generate CBZ comics from MangaDex releases
|
||||
|
|
5
go.mod
5
go.mod
|
@ -1,9 +1,8 @@
|
|||
module code.fmartingr.dev/fmartingr/mangadex2cbr
|
||||
module github.com/fmartingr/mangadex2cbz
|
||||
|
||||
go 1.15
|
||||
|
||||
require (
|
||||
code.fmartingr.dev/fmartingr/go-mangadex v0.0.0-20210209223856-e7c5b4489931
|
||||
github.com/fmartingr/go-mangadex v1.0.0
|
||||
github.com/sirupsen/logrus v1.7.0
|
||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c // indirect
|
||||
)
|
||||
|
|
6
go.sum
6
go.sum
|
@ -1,7 +1,7 @@
|
|||
code.fmartingr.dev/fmartingr/go-mangadex v0.0.0-20210209223856-e7c5b4489931 h1:DqfEAJhJaP+DYVVrw9LjoDol4NLD14wLVyCe+8Cblsc=
|
||||
code.fmartingr.dev/fmartingr/go-mangadex v0.0.0-20210209223856-e7c5b4489931/go.mod h1:kcfwcGVuiSu/dloZwo/G8FxDzNHA/zanIr8DC5VResQ=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/fmartingr/go-mangadex v1.0.0 h1:eRs8mYpl+SDVPogJzmZDnPizV4b5io/u1p3rIYY8PQ4=
|
||||
github.com/fmartingr/go-mangadex v1.0.0/go.mod h1:FwNnYzdQagMuRyPFVWAOOGRXBg9R9Hr6A0CeuQidPnQ=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM=
|
||||
|
@ -10,5 +10,3 @@ github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1
|
|||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk=
|
||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
|
|
2
main.go
2
main.go
|
@ -1,7 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"code.fmartingr.dev/fmartingr/mangadex2cbr/pkg/cli"
|
||||
"github.com/fmartingr/mangadex2cbz/pkg/cli"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -16,8 +16,8 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"code.fmartingr.dev/fmartingr/go-mangadex"
|
||||
"code.fmartingr.dev/fmartingr/mangadex2cbr/pkg/tasks"
|
||||
"github.com/fmartingr/go-mangadex"
|
||||
"github.com/fmartingr/mangadex2cbz/pkg/tasks"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
|
@ -117,7 +117,7 @@ func Start() {
|
|||
|
||||
var mangaChapters []mangadex.MangaChapterList
|
||||
mangaGroups := map[int]mangadex.MangaGroup{}
|
||||
chapterParams := mangadex.NewGetChaptersParams()
|
||||
chapterParams := mangadex.NewChaptersParams()
|
||||
|
||||
selectedLanguage := *languageFlag
|
||||
var fetchChaptersTasks []tasks.Task
|
||||
|
@ -310,7 +310,6 @@ func Start() {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: Zip folders into CBR files
|
||||
logrus.Info("Compressing volumes")
|
||||
|
||||
files, errReadVolumes := ioutil.ReadDir(mangaOutputPath)
|
||||
|
@ -320,11 +319,11 @@ func Start() {
|
|||
|
||||
for file := range files {
|
||||
if files[file].IsDir() {
|
||||
destinationPath := filepath.Join(mangaOutputPath, files[file].Name()) + ".cbr"
|
||||
destinationPath := filepath.Join(mangaOutputPath, files[file].Name()) + ".cbz"
|
||||
if !fileExists(destinationPath) {
|
||||
_, errZip := zipVolume(destinationPath)
|
||||
if errZip != nil {
|
||||
logrus.Errorf("Error packing CBR file: %s", errZip)
|
||||
logrus.Errorf("Error packing CB file: %s", errZip)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue