rschroll / beru

The Basic Epub Reader for Ubuntu
http://rschroll.github.io/beru/
GNU General Public License v3.0
25 stars 12 forks source link

Support comic book archives: cbr/ cbz #78

Open kalikiana opened 9 years ago

kalikiana commented 9 years ago

Aside from ebooks I read comic books in cbz/ cbr which are basically archives containing images. Beru has support for compressed files already, and the first page could be used for the cover art view, that's how other comic viewers do it.

rschroll commented 9 years ago

Is there a standard for the archive layout? I've downloaded two to check them out. One put the files in the root, the other put the files in a subdirectory. One had files with numeric names, the other alphanumeric. It'd be helpful to know all the possible permutations.

Is metadata stored anywhere? I couldn't find any in the samples I've seen. Beru expects at least a title and an author. If we can't get real values for those, we may need to rethink some things.

My initial thought had been that we'd need to get a whole new JS library, equivalent to Monocle, to display the CBZ. But now that I think about it some more, I don't see any reason not to display it with Monocle. We'd just need a class that implements the public interface of EpubReader for CBZ files. There'd need to be some refactoring to call the right reader class, but I don't think it'd be too bad.

popey commented 9 years ago

All the cbr/cbz files I have (admittedly mostly from the same location - Humble Bundle) are just a series of numeric jpegs starting at 0001.jpeg through nnnn.jpeg. There's no meta-data in the images or in the file. Seems the filename is the only information you get.

rschroll commented 9 years ago

I've pushed a branch named cbz that contains preliminary support for CBZ and PDF files. (They both involve displaying images instead of text.) I'm assuming that the images in a CBZ file are intended to be displayed in the order they appear in the ZIP structure. I don't know if that's the case or not.

I'm interested to hear how this work for people. There's currently not magnification, so this could lead to eyestrain on smaller devices. I'm not quite sure how zooming would work if we want to keep the swipe-to-turn system.

rschroll commented 9 years ago

I've merged in the preliminary CBZ support. I'd appreciate anyone who can test it out on their books.

I think we're going to need a zoom feature before this is really useful. I'm not sure if a pinch-to-zoom or an n-up display will work better. It may depend on the layout, so we may want both.

I can't find any libraries to unRAR files, so no CBR support. It looks like evince just shells out to the unrar binary....

padraic7a commented 8 years ago

I've just tested this now on the Aquarius M10 tablet with a cbz comic. It shows one page at a time, and because the tablet is probably close to the printed page size, and because the page fills the screen it displays pretty well. Thanks!

It would be great to get .cbr support too.

Thanks again for your work!

kalikiana commented 8 years ago

I realized I never confirmed it here, so for the record: CBZ works very smoothly. It would be nice if CBR could also be supported, although that can be considered a matter of convenience, converting the respective archives is pretty simple.