ciromattia / kcc

KCC (a.k.a. Kindle Comic Converter) is a comic and manga converter for ebook readers.
ISC License
2.61k stars 209 forks source link

[Feature Request] Combine multiple CBZ files #612

Open User28237489 opened 10 months ago

User28237489 commented 10 months ago

Option for cbz files to be converted and compiled into one epub output.

At the moment I unpack cbz's, rename the folder to the chapter number, compress the file back to a zip, then append .cbz. KCC then converts the new file and all is good. Sometimes I will have to do this 100-200+ times for single chapters not placed into volumes yet.

I have tinkered around with EpubMerge in Calibre but the resulting image on my Kobo Sage is altered and gets clipped on the right side and bottom.

Greatly appreciate all your work, thank you.

Edit more details:

Manga chapter CBZs are released as they are translated each week. My workflow is selecting all and unpacking which results in folders (chapters) of images. Sometimes these need to be renamed to not throw an error message in KCC. Selected chapter folders are dragged into a new single folder create a volume folder. New single volume folder is compressed into a single zip. Resulting file is run through KCC to build an epub.

Would be cool if, for example, ten CBZ files are dropped in and with the option checked KCC could spit out one single epub.

axu2 commented 9 months ago

New single volume folder is compressed into a single zip.

This part is not necessary, you can use the folder directly in kcc.

You can chunk the final output automatically with variant b: https://github.com/ciromattia/kcc/wiki/Automatic-output-splitting

8uziak commented 4 months ago

Proof of Concept

image

8uziak commented 4 months ago

Also, do we consider expanding the usability of the Add directory button to make use of it to add directories containing CBZ files?

Is Chapter fusion chapter's name clear? Or change it to CBZ merge or something else?

axu2 commented 4 months ago

To be clear, you are planning to automate this process? @8uziak

https://github.com/ciromattia/kcc/assets/20757319/4c87739e-938e-44af-8637-451c9aada4a6

On Windows, you do the same with 7-zip instead.

Screenshot 2024-08-11 104038

8uziak commented 4 months ago

@axu2 Yeah, I know there is a workaround, but i feel like KCC could skip the part where you need to unpack cbz files manually. Therefore I think to add a feature with adding cbz directory and merging it into one desired file format.

axu2 commented 4 months ago

Does it even need to be an option? If it sees a directory of cbz unpack them all?

8uziak commented 4 months ago

@axu2 Allowing Adding directory with CBZ files doesn't require new features in KCC's UI. We want to detect CBZ files and unpack them in the same way you attach CBZ files using Add file button.

New checkbox (Chapter fusion) I suggested would be a separate feature where you can merge all CBZ files into one desired output file.

Example scenario:

Hope my idea is a little bit cleaner :)

@axu2 and let's move the issue here rather than write on two separate threads

axu2 commented 4 months ago

Ah yes, that makes sense now, I was combining the two features in my head.

just drag a bunch of CBZ into the KCC window and click merge image

Maybe id call it

Merge all files

Levi--G commented 3 months ago

I would love to see this, im currently using a script as well to unpack. Would it maybe also be an option to detect/group per volume? maybe with an option? Something like:

unchecked: no grouping, repack individual files indeterminate: group per volume or 10 items if no volume found in title checked: group all

This would be awesome!

axu2 commented 3 months ago

@Levi--G

Have you tried variant b?

https://github.com/ciromattia/kcc/wiki/Automatic-output-splitting

Levi--G commented 3 months ago

@Levi--G

Have you tried variant b?

https://github.com/ciromattia/kcc/wiki/Automatic-output-splitting

I had not, i will try that but the problem remains that i cant import multiple CBZ in a directory and would have to create the directories with an external script :) The problem i see with using the existing option is that it only works on the directories, but if you make it work on files as well and detect the Vol.xx names in the files that could work as well. :) Thanks

axu2 commented 3 months ago

The ideal naming method would be a text field showing up when you click the merge all files box, similar to how you can manually type in a resolution in the custom 'other' profile. It could possibly be pre-populated with the longest common prefix.

Your other PR is on hold because it might need to change depending on this PR.

Edit: @8uziak are you still interested in this feature? I edited the discussion to make it clearer what the focus is.