CbXManager icon indicating copy to clipboard operation
CbXManager copied to clipboard

Cbr - rar support?

Open migube opened this issue 1 year ago • 7 comments

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!

migube avatar Oct 27 '24 17:10 migube

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.

Lightjohn avatar Oct 27 '24 18:10 Lightjohn

can u use import rarfile ?

migube avatar Oct 27 '24 19:10 migube

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 :(

Lightjohn avatar Oct 27 '24 19:10 Lightjohn

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

migube avatar Oct 28 '24 07:10 migube

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 :)

Lightjohn avatar Oct 31 '24 19:10 Lightjohn

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

migube avatar Oct 31 '24 20:10 migube

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

migube avatar Nov 04 '24 20:11 migube