Girbons / comics-downloader

tool to download comics and manga in pdf/epub/cbr/cbz from a website
MIT License
457 stars 49 forks source link

Download comic as images inside respective folders #34

Closed satishbabariya closed 4 years ago

satishbabariya commented 5 years ago

Download comic as images inside respective folders like mangarock.com/naruto/cp-01/1.img ...

Girbons commented 5 years ago

Hi @satishbabariya,

Basically, you are asking to keep the downloaded images alongside the pdf or whatever the final file format is?

satishbabariya commented 5 years ago

@Girbons yeah.

satishbabariya commented 5 years ago

options like,

const (
    CBR  = "cbr"
    CBZ  = "cbz"
    EPUB = "epub"
    PDF  = "pdf"
        IMG = "img"
)
Girbons commented 5 years ago

@satishbabariya What do you think about something like 2 parameters like --only-images used alongside --images-format?

satishbabariya commented 5 years ago

@Girbons, that would be great, also --images-format can have a default value if not given? and --only-images will not create pdf's right?

Girbons commented 5 years ago

@satishbabariya Just the images, no PDF. As default Image format I was thininking about png.

satishbabariya commented 5 years ago

@Girbons :thumbsup:

Girbons commented 5 years ago

@satishbabariya if you want to try out this branch feel free to do it, would be nice to have a feedback!

I need to fix few things in the GUI then I will release the 0.15.

satishbabariya commented 5 years ago

@Girbons sure, though not working when passing -url flag with multiple or single urls

go run cmd/downloader/main.go -url=https://mangarock.com/manga/mrs-serie-100350535/chapter/mrs-chapter-100409200 -images-only

I think the length of flag.Args() is getting zero, here https://github.com/Girbons/comics-downloader/blob/34-download-only-images/cmd/downloader/main.go#L38

also after downloading completed can't able to find images folder in the comics folder? here, https://github.com/Girbons/comics-downloader/blob/34-download-only-images/pkg/core/core.go#L357

satishbabariya commented 4 years ago

@Girbons, wouldn't it better to download the images directly to the respective folder comics/mangarock.com/Solo Leveling/Solo Leveling-Chapter 53/img1.png rather than using temp dir

because after downloading the directory still remains empty, and in current approch, the image will download every time (i think) if it still already available inside the chapter folder

Girbons commented 4 years ago

@Girbons, wouldn't it better to download the images directly to the respective folder comics/mangarock.com/Solo Leveling/Solo Leveling-Chapter 53/img1.png rather than using temp dir

Yes, its a good idea, I need to refactor that part. I can easily remove the current logic and reuse https://github.com/Girbons/comics-downloader/blob/34-download-only-images/pkg/core/core.go#L312

the image will download every time (i think)

Yes, right now there aren't checks to see if there is already an image folder.