internetarchive / bookreader

The Internet Archive BookReader
https://openlibrary.org/dev/docs/bookreader
GNU Affero General Public License v3.0
953 stars 409 forks source link

Request: Documentation about Comics Book - CBR and CBZ #1314

Open Jerome674 opened 5 months ago

Jerome674 commented 5 months ago

Context

On the archives.org site, it is possible to load .CBR and .CBZ (Comics Book) files, as shown on this link : https://archive.org/details/megamancomics5055/Mega%20Man%20050%20%282015%29%20GetComics.INFO/page/n11/mode/2up

I haven't found any documentation on how to do this, is it already integrated? If so, how do I go about it?

Thanks :)

jameswhite commented 1 month ago

.cbr and .cbz files are just .rar and .zip files (respectively) so you'll need to unpack them and index them in a format that the bookreader can understand.

I've done this over at https://github.com/jameswhite/iabr, which was just a laboratory to see what work would be involved to accomplish this for .cbr (rar), .cbz (zip), and pdf, documents.

They're just bash scripts ( in /bin ) but they demonstrate how to do what you'd like to accomplish.

There's probably a better way to do it, like having a backend service index and unpack each page on demand. I'm not sure how archive.org is achieving this on the link you provided.

jameswhite commented 3 weeks ago

Update: I've modified https://github.com/jameswhite/iabr so that it does the work inline. It will now let you browse to your books and if you click on a .cbr, .cbz, or .pdf file, it auto-indexes it (which is a little slow, adding some caching or pre-indexing here might help) but then auto-unpacks them on-the-fly and renders them using the internetarchive/bookreader.