Lightjohn / CbXManager

Easily create/extract cbz or cbr files with a python script, can split and adapt to manga read order
35 stars 7 forks source link

Cbr - rar support? #5

Open migube opened 4 weeks ago

migube commented 4 weeks ago

Hello again :) in the description you mention cbr, but from a quick test & looking at the code, only cbz-zip atm ? Any plans to add the rar tools? tx!

Lightjohn commented 4 weeks ago

Hi :) Indeed I said CBR but might not be true... CBR is rar and rar mean some licenses preventing open source libraries to exist. So adding cbr support would mean I rely on external tool libraries already installed and they will not be compatible with existing code sadly.

migube commented 4 weeks ago

can u use import rarfile ?

Lightjohn commented 4 weeks ago

From the documentation: https://rarfile.readthedocs.io/api.html#module-rarfile For decompression to work, either unrar or unar tool must be in PATH. Which for windows will not be very intuitive or will lead to more bugs... This lib is better than the other I was looking but it's not pure python so it's complicated Edit: also it's only for reading and not writing :(

migube commented 3 weeks ago

yes, it would be ideal to convert to cbz :) (coming from https://github.com/binarynonsense/comic-book-reader?tab=readme-ov-file)

Lightjohn commented 3 weeks ago

sadly as there is no easy way to integrate rar in my code I would juste recommend something like that:

unar file.cbr -o out && zip -r file.cbz out

But that's sadly a bit too much for my old small library :)

migube commented 3 weeks ago

ok no worries. note another one could be https://wummel.github.io/patool/

migube commented 2 weeks ago

I played a bit with patool and quite fast. Though issues with urf8 (accents, ....) but well :)