Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > PocketBook

Notices

Reply
 
Thread Tools Search this Thread
Old 08-16-2024, 09:18 AM   #1
EastEriq
Groupie
EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!
 
Posts: 177
Karma: 100516
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
Question koreader as default for every epub except those from .acsm

I like koreader, so my /mnt/ext1/system/config/extensions.cfg is very partial to it. However I also borrow DRM books from libraries, so I get .acsm. When I tap the acsm file icon on the home screen, or the entry in the librarian, the content is downloaded, the acsm file is deleted and the reader goes on opening the resulting epub. As expected, but since extensions.cfg says
Code:
epub:@EPUB_file:1:koreader.app,eink-reader.app:ICON_EPUB
then koreader is immediately called up for opening the book, and it complains that it cannot read the encrypted content. Also this is expected. So I have to close the book, go to the librarian, search for the book again, long press on it, and choose Open with PB Reader. This is firmware 5.2, long press does not even offer the choice on the home screen, and it's a bit of a PITA. True that then the preferred program for opening the book is remembered (stored in handlers.cfg), but still a nuisance.

Is anyone aware of any trick I could play for triggering pbreader only on epubs coming from acsm downloads, while leaving koreader as preferred default for all others?


Last edited by EastEriq; 08-16-2024 at 09:32 AM.
EastEriq is online now   Reply With Quote
Old 08-16-2024, 11:56 AM   #2
dmalinovsky
Enthusiast
dmalinovsky ought to be getting tired of karma fortunes by now.dmalinovsky ought to be getting tired of karma fortunes by now.dmalinovsky ought to be getting tired of karma fortunes by now.dmalinovsky ought to be getting tired of karma fortunes by now.dmalinovsky ought to be getting tired of karma fortunes by now.dmalinovsky ought to be getting tired of karma fortunes by now.dmalinovsky ought to be getting tired of karma fortunes by now.dmalinovsky ought to be getting tired of karma fortunes by now.dmalinovsky ought to be getting tired of karma fortunes by now.dmalinovsky ought to be getting tired of karma fortunes by now.dmalinovsky ought to be getting tired of karma fortunes by now.
 
Posts: 46
Karma: 388296
Join Date: Aug 2022
Location: USA
Device: Pocketbook Inkpad Color 3
I have the same issue, so I simply unassigned KOReader from ePubs and open them from the KOReader itself. You can assign a key to switch between the applications — it's helpful after downloading new books via Send to Pocketbook feature.
dmalinovsky is offline   Reply With Quote
Advert
Old 08-16-2024, 01:58 PM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 75,500
Karma: 134254362
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Thread belongs in the KOReader forum.
JSWolf is online now   Reply With Quote
Old Yesterday, 01:55 PM   #4
EastEriq
Groupie
EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!
 
Posts: 177
Karma: 100516
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
Quote:
Originally Posted by dmalinovsky View Post
I have the same issue, so I simply unassigned KOReader from ePubs and open them from the KOReader itself. You can assign a key to switch between the applications — it's helpful after downloading new books via Send to Pocketbook feature.
Thanks, but I think that this won't cut it for me - I still like that all the public domain epubs which I download open by default with KOR. If there was another solution, I'd prefer.
EastEriq is online now   Reply With Quote
Old Yesterday, 01:57 PM   #5
EastEriq
Groupie
EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!
 
Posts: 177
Karma: 100516
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
Quote:
Originally Posted by JSWolf View Post
Thread belongs in the KOReader forum.
Don't think so. It's not about KOReader in particular, rather it's about the steps in which Pocketbook processes acsm, and if it is possible to change that sequence.
EastEriq is online now   Reply With Quote
Advert
Old Yesterday, 02:44 PM   #6
neil_swann80
0000000000101010
neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.
 
neil_swann80's Avatar
 
Posts: 5,665
Karma: 11226897
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
Quote:
Originally Posted by EastEriq View Post
When I tap the acsm file icon on the home screen, or the entry in the librarian, the content is downloaded, the acsm file is deleted and the reader goes on opening the resulting epub.
Interesting problem. What directory is the epub file that the acsm generates downloaded to?
neil_swann80 is online now   Reply With Quote
Old Yesterday, 04:15 PM   #7
EastEriq
Groupie
EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!
 
Posts: 177
Karma: 100516
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
The final epub goes in the same directory where the acsm file is, before it's deleted. IIRC sometimes you can see the librarian updating the percentage of the download in progress on the icon of the newly created epub, which would give the impression that no intermediate temporary file is involved, but I can't really tell, it may be just an animation. Then you see the librarian changing the file name with the book title and rendering the cover image, before the default reading program opens.
EastEriq is online now   Reply With Quote
Old Yesterday, 04:35 PM   #8
neil_swann80
0000000000101010
neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.
 
neil_swann80's Avatar
 
Posts: 5,665
Karma: 11226897
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
Quote:
Originally Posted by EastEriq View Post
The final epub goes in the same directory where the acsm file is, before it's deleted. IIRC sometimes you can see the librarian updating the percentage of the download in progress on the icon of the newly created epub, which would give the impression that no intermediate temporary file is involved, but I can't really tell, it may be just an animation. Then you see the librarian changing the file name with the book title and rendering the cover image, before the default reading program opens.
If you long-press on the item on the home screen or library do you have an option for "Book Info"? As this should list the filename which contains the directory path of the file. Can you do that for the acsm and epub files to confirm what directories they are? If it's a unique directory that could provide a means of distinguishing/separating the epubs.

What is the process for acquiring the acsm files on your pocketbook?
neil_swann80 is online now   Reply With Quote
Old Yesterday, 04:50 PM   #9
EastEriq
Groupie
EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!
 
Posts: 177
Karma: 100516
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
Quote:
Originally Posted by neil_swann80 View Post
If you long-press on the item on the home screen or library do you have an option for "Book Info"? As this should list the filename which contains the directory path of the file. Can you do that for the acsm and epub files to confirm what directories they are? If it's a unique directory that could provide a means of distinguishing/separating the epubs.
I am sure that it is the same directory, because normally I use the librarian to browse by folder, and because I know where I copy the acsm to and where the resulting epub file sits in the tree. And well, yes, I could from now on take the habit of copying the acsms and only them in a specific dir rather than all over the place according to some other criterium of mine. But still, how could the extensions.cfg mechanism discriminate by dir?

Quote:
What is the process for acquiring the acsm files on your pocketbook?
I do not have a fixed way which I would be satisfied intercepting. Most conveniently I get the acsm with a computer and transfer it via samba/wifi, but sometimes I use sync Dropbox Pocketbook and some other I copy via usb. I would be looking at what is happening on the reader after the file is there and I tap on it. If the process was handled by a shell script sitting in some secret directory, we could see about tampering (I have root).

EastEriq is online now   Reply With Quote
Old Yesterday, 05:03 PM   #10
neil_swann80
0000000000101010
neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.
 
neil_swann80's Avatar
 
Posts: 5,665
Karma: 11226897
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
Quote:
Originally Posted by EastEriq View Post
I could from now on take the habit of copying the acsms and only them in a specific dir rather than all over the place according to some other criterium of mine. But still, how could the extensions.cfg mechanism discriminate by dir?
If the acsm and the resulting epubs are in the same directory, and you're happy to store all the acsm files in a dedicated directory, I think there could be a way around it.

We could leave extensions.cfg as-is, the default for epubs remaining as Koreader. But we could run a check for the directory the epub is in and (if the check matches the dedicated directory) create a entry for that specific epub in handlers.cfg with PBReader as the default.

I was thinking a few lines of code at the start of the koreader launcher file in /mnt/ext1/system/bin/koreader.app may suffice.
Run the check, if the check matches the dedicated directory we write to handlers.cfg and exit without launching koreader. You'd then have to click on the book a second time for it to launch with PBreader. If the check does not match the dedicated directory, no writing to handlers.cfg and Koreader launches the epub as usual.

Last edited by neil_swann80; Yesterday at 05:20 PM.
neil_swann80 is online now   Reply With Quote
Old Today, 02:40 AM   #11
neil_swann80
0000000000101010
neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.
 
neil_swann80's Avatar
 
Posts: 5,665
Karma: 11226897
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
Try using this custom version of /mnt/ext1/system/bin/koreader.app (zip attached):
Code:
#!/bin/sh

epubDir=$(dirname "$1")
openWith="/mnt/ext1/system/config/handlers.cfg"

if [ "$epubDir" == "/mnt/ext1/ACSM" ]; then
  echo "${1}:eink-reader.app" >> $openWith
  exit
fi

exec /mnt/ext1/applications/koreader.app "$@"
The .acsm files would need to be saved in: /mnt/ext1/ACSM
Attached Files
File Type: zip koreader.zip (386 Bytes, 3 views)

Last edited by neil_swann80; Today at 07:48 AM.
neil_swann80 is online now   Reply With Quote
Old Today, 05:04 AM   #12
EastEriq
Groupie
EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!EastEriq rocks like Gibraltar!
 
Posts: 177
Karma: 100516
Join Date: Jan 2018
Device: Cybook Orizon, PocketBook Touch HD
Thanks, I will check it in due time, I'm on the move today.

Another idea I had is that if there was a small application capable of determining whether the epub is DRMed or not, that one could be set as the default opener, in a script which then calls either eink-reader or koreader depending on the result.

Still another one is that koreader does detect that an epub is DRMd (because it reports it), so a user patch cold be that it closes itself launching eink-reader instead.
EastEriq is online now   Reply With Quote
Old Today, 06:08 AM   #13
neil_swann80
0000000000101010
neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.
 
neil_swann80's Avatar
 
Posts: 5,665
Karma: 11226897
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
Quote:
Originally Posted by EastEriq View Post
Another idea I had is that if there was a small application capable of determining whether the epub is DRMed or not, that one could be set as the default opener, in a script which then calls either eink-reader or koreader depending on the result.
You could try testing for the presence of rights.xml or encryption.xml within the epub container. I think epub3 files are trickier and can contain these files anyway even if there's no DRM.

Quote:
Originally Posted by EastEriq View Post
Still another one is that koreader does detect that an epub is DRMd (because it reports it), so a user patch cold be that it closes itself launching eink-reader instead.
That would require a dedicated koreader plugin, would be plenty of work.

If you make any progress please post it here, I'd be interested to see your approach.
neil_swann80 is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
KOreader as default on Boox Poke 3 Waylander KOReader 4 05-22-2021 05:09 PM
Plato or Koreader by default stiivo Kobo Reader 3 07-28-2020 02:39 PM
eBooks use epub so why am I getting an acsm file? Atomised Conversion 9 05-30-2018 04:51 PM
epub and ocsm (NOT acsm) clemens14 ePub 0 12-26-2015 03:07 PM
How long between dowloading the .acsm and downloading epub? Mad_Max ePub 0 01-07-2011 02:18 PM


All times are GMT -4. The time now is 11:32 AM.


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