Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 04-07-2019, 07:36 AM   #1
BloodRagg
Zealot
BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.
 
BloodRagg's Avatar
 
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
Feature request: CBR support

I would like to request to CBR support, I could not find any topic on this, but then again that could be my search skills also

My current workaround: (depends on 7zip and unrar)

This is a recursive version: **EVERYTHING ending on .cbr will be converted to cbz**

sudo apt install p7zip-full unrar

Conversion:

Code:
find -type f -iname '*.cbr' -exec sh -c 't="`mktemp -d`";f="{}";unrar x -y "$f" "$t" && 7z a -r -sdel -tzip -mx=9 "${f%r}z" "$t/*";rmdir "$t"' \;
Inplace conversion: (removes original cbr)

Code:
find -type f -iname '*.cbr' -exec sh -c 't="`mktemp -d`";f="{}";unrar x -y "$f" "$t" && 7z a -r -sdel -tzip -mx=9 "${f%r}z" "$t/*" && rm "$f";rmdir "$t"' \;

Last edited by BloodRagg; 04-07-2019 at 08:00 AM.
BloodRagg is offline   Reply With Quote
Old 04-07-2019, 11:49 AM   #2
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,613
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
There's an issue about it: https://github.com/koreader/koreader/issues/1517
Frenzie is offline   Reply With Quote
Advert
Old 04-08-2019, 10:07 AM   #3
BloodRagg
Zealot
BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.
 
BloodRagg's Avatar
 
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
Could a workaround be added in the file browser? run you custom script against the current file.
It must still show the cbr files , now they are hidden.
BloodRagg is offline   Reply With Quote
Old 04-08-2019, 01:20 PM   #4
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Nothing ships unrar, IIRC.

And it'd be fairly IO/CPU intensive, with minimal UI callback possible (think OTA updates), which pretty much punts that off to the "gross hack" category .

That's a task much better left to the other side of the equation (i.e., do it before/during sending the file to the device instead).

Last edited by NiLuJe; 04-08-2019 at 01:23 PM.
NiLuJe is offline   Reply With Quote
Old 04-21-2019, 01:52 PM   #5
BloodRagg
Zealot
BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.BloodRagg ought to be getting tired of karma fortunes by now.
 
BloodRagg's Avatar
 
Posts: 128
Karma: 842196
Join Date: Feb 2019
Device: none
Quote:
Originally Posted by NiLuJe View Post
Nothing ships unrar, IIRC.

And it'd be fairly IO/CPU intensive, with minimal UI callback possible (think OTA updates), which pretty much punts that off to the "gross hack" category .

That's a task much better left to the other side of the equation (i.e., do it before/during sending the file to the device instead).
Kobo firmware ships unrar , but you probably meant anything based on CR3 ?
Source code of unrar is open, but im guessing this uses a library for direct handling of
zip files ? So you would need something similar for rar files ? Is some kind of a stub possible
that uses the unrar executable ?
BloodRagg is offline   Reply With Quote
Advert
Old 04-21-2019, 02:31 PM   #6
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Huh. I wasn't expecting that .

I'd go with libarchive, it has a great API, and it just recently picked up RAR5 support.
NiLuJe is offline   Reply With Quote
Old 04-21-2019, 03:07 PM   #7
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,613
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Quote:
Originally Posted by BloodRagg View Post
Kobo firmware ships unrar , but you probably meant anything based on CR3 ?
Source code of unrar is open, but im guessing this uses a library for direct handling of
zip files ? So you would need something similar for rar files ? Is some kind of a stub possible
that uses the unrar executable ?
You can compile unrar to a library (unrar.dll, unrar.so). This is directly supported by crengine for opening rarred HTML filed, but we don't build it.

However, cbz is handled by MuPDF, not crengine.
Frenzie is offline   Reply With Quote
Old 05-01-2019, 11:24 AM   #8
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 2,985
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
Quote:
Originally Posted by NiLuJe View Post
Huh. I wasn't expecting that .

I'd go with libarchive, it has a great API, and it just recently picked up RAR5 support.
I'm going from memory, but I thought libarchive was for unpacking entire archive files. The nice thing about using the unrar library is that you can open the files one at a time as needed. It saves on diskspace while reading, and makes startup much faster (you don't have to wait for the entire archive to be unpacked).

The pbimageviewer code I worked on for PocketBook devices unpacks single files. The source code for that is available if you want an idea of how much work it would be to implement.
rkomar is offline   Reply With Quote
Old 05-01-2019, 12:12 PM   #9
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
I'm not familiar with the unrar API (but I do know it's there ), but you can certainly skip through the archive's content without unpacking anything with libarchive .
NiLuJe is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
new feature request - paste image support dhdurgee Sigil 16 11-22-2015 06:29 AM
Feature Request: ZIM Conversion Support kichigai Conversion 1 07-24-2011 08:53 PM
Feature Request - ability to send CBR/CBZ to ereader device BakaNeko59 Library Management 4 06-20-2011 02:59 PM
feature request - OPDS support readx EPUBReader 4 01-13-2010 01:03 PM
feature request: support for iliad on OS X petteri Calibre 1 12-30-2009 08:23 AM


All times are GMT -4. The time now is 04:31 PM.


MobileRead.com is a privately owned, operated and funded community.