Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compress to cbz option #7

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

wyldphyre
Copy link
Contributor

  • Enhanced the --separate option with a --cbz option, which compresses each chapter into a .cbz file
  • Updated the usage information with the new option
  • Fix the spelling of 'separate' in the usage information

@wyldphyre
Copy link
Contributor Author

I only dabble with Python so hopefully this was implemented in an acceptable fashion.

src/webtoon_downloader.py Outdated Show resolved Hide resolved
with ThreadPoolExecutorWithQueueSizeLimit(maxsize=10, max_workers=4) as pool:
for page_number, url in enumerate(img_urls):
pool.submit(download_image, chapter_download_task_id, url, dest, chapter_info.chapter_number, page_number, image_format=images_format)
image_download_futures.add(
pool.submit(download_image, chapter_download_task_id, url, dest, chapter_info.chapter_number, page_number, image_format=images_format)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Images will still be downloaded to the provided dest, so ending up with a copy of the images and the .cbz as well

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function needs to change anyways in order to allow for .cbz conversion in memory maybe.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I left the existing files and folder in place because I didn't want to assume too much about what should change. I mostly added this to scratch my own itch of not wanting to deal with 150+ folders to compress for the toon I wanted to download.

@Zehina
Copy link
Owner

Zehina commented May 14, 2022

I'll try to do some major changes to enable this to work well while keeping the download as fast as it always is. While also keeping the main thread not being overloaded with the work of zipping.

Make sure both separate options are considered

Co-authored-by: Ali Taibi <[email protected]>
@wyldphyre
Copy link
Contributor Author

As I mentioned above, this was done to scratch my own itch. If you'd prefer to do it your own way and skip this PR that's fine with me.

@DuaelFr
Copy link

DuaelFr commented May 30, 2024

Last version allows to use --save-as cbz so this PR seems outdated and might be closed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants