Register Guidelines E-Books Search Today's Posts Mark Forums Read

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 once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.
 
BloodRagg's Avatar
 
Posts: 125
Karma: 1988
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
Guru
Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.
 
Posts: 648
Karma: 115152
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 once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.
 
BloodRagg's Avatar
 
Posts: 125
Karma: 1988
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: 8,619
Karma: 12901212
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O & Forma
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 once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.BloodRagg once ate a cherry pie in a record 7 seconds.
 
BloodRagg's Avatar
 
Posts: 125
Karma: 1988
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: 8,619
Karma: 12901212
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O & Forma
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
Guru
Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.Frenzie can see what is invisible to the naked eye.
 
Posts: 648
Karma: 115152
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,583
Karma: 9200000
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840
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: 8,619
Karma: 12901212
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O & Forma
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:52 AM.


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