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 whole manga #15

Closed jphager2 closed 5 years ago

jphager2 commented 5 years ago

ISSUE: https://github.com/Girbons/comics-downloader/issues/14

jphager2 commented 5 years ago

@Girbons Is this way acceptable for you? Do you have any feedback. Should any concurrency be added?

Girbons commented 5 years ago

Hi @jphager2,

Thanks for the PR, looks good 👍. I was wondering if we really need the Collection struct, could we collect all the comics just only inside a slice?

Anyway you can always find me on https://gophersinvite.herokuapp.com/

jphager2 commented 5 years ago

@Girbons, I've also removed MangaHere in this PR. Hope that is okay.

jphager2 commented 5 years ago

Hey @jphager2 ,

Amazing work on this issue , I left a couple of comments.

What is needed now is to have a parameter in the command line that allow to download the whole manga.

Right now it will work that if you provide the url for the chapter, it will only download the chapter, but if you provide the manga/comic page it will download all chapters. So with the flag what should be the behavior if (lets say the flag is --all) the url is https://www.mangareader.net/one-piece and --no-all is passed or the url is https://www.mangareader.net/one-piece/941 and --all is passed?

Once we'll have a solid codebase we are going to handle the concurrency.

Sounds good.

Girbons commented 5 years ago

@jphager2 What I was thinking is that the user may find useful to insert just the chapter url and pass something like --all to download all the chapters. What do you think about it? --all should be handled when we recognize that the url is https://www.mangareader.net/one-piece/941. Otherwise we'll use the default behaviour.

jphager2 commented 5 years ago

@jphager2 What I was thinking is that the user may find useful to insert just the chapter url and pass something like --all to download all the chapters. What do you think about it? --all should be handled when we recognize that the url is https://www.mangareader.net/one-piece/941. Otherwise we'll use the default behaviour.

Yeah makes sense to me.

Girbons commented 5 years ago

@jphager2 one last thing then I'm going to merge this pr, could you please update the README explaining how to download a whole manga?

jphager2 commented 5 years ago

@jphager2 one last thing then I'm going to merge this pr, could you please update the README explaining how to download a whole manga?

Sure thing :D

coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 64


Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/sites/loader.go 36 40 90.0%
pkg/sites/comicextra/comicextra.go 23 28 82.14%
pkg/sites/mangareader/mangareader.go 22 27 81.48%
pkg/sites/mangarock/mangarock.go 25 30 83.33%
pkg/sites/mangatown/mangatown.go 22 27 81.48%
<!-- Total: 132 156 84.62% -->
Files with Coverage Reduction New Missed Lines %
pkg/core/core.go 1 67.84%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 58: 8.7%
Covered Lines: 473
Relevant Lines: 606

💛 - Coveralls