Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 08-17-2020, 05:33 AM   #1
Winkelschraube
Connoisseur
Winkelschraube began at the beginning.
 
Winkelschraube's Avatar
 
Posts: 98
Karma: 10
Join Date: Jul 2020
Device: The (orly) amazing Kindle Oasis 3
Lightbulb Save the cover as an image file when loading a document

How can I specify that when a document is opened, the cover is saved as an image file with a fixed name?
Winkelschraube is offline   Reply With Quote
Old 08-17-2020, 09:27 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,741
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
I don't think you can. Is that an option in another program?
Frenzie is offline   Reply With Quote
Advert
Old 08-17-2020, 09:58 AM   #3
Ken Maltby
Wizard
Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.
 
Ken Maltby's Avatar
 
Posts: 4,466
Karma: 6900052
Join Date: Dec 2009
Location: The Heart of Texas
Device: Boox Note2, AuraHD, PDA,
It would be helpful if you could describe how you wanted to use the image/file. You can take a screenshot that will be saved as a .png, with a name Reader_date_time.
When you take a successful screenshot, you are given where the snapshot png is stored and offered an option to set it as the screensaver. (The option won't work if the OS on your device manages the screensaver function, like Android does on my note 2.)

Luck;
Ken
Ken Maltby is offline   Reply With Quote
Old 08-17-2020, 10:33 AM   #4
Winkelschraube
Connoisseur
Winkelschraube began at the beginning.
 
Winkelschraube's Avatar
 
Posts: 98
Karma: 10
Join Date: Jul 2020
Device: The (orly) amazing Kindle Oasis 3
Smile

Hello my friend.

I want to make a screensaver from the cover. I have an android reader. I can then link to a picture as a screensaver.

Best would be something like /koreader/currentcover.png or something like that.
Winkelschraube is offline   Reply With Quote
Old 08-17-2020, 10:33 AM   #5
Winkelschraube
Connoisseur
Winkelschraube began at the beginning.
 
Winkelschraube's Avatar
 
Posts: 98
Karma: 10
Join Date: Jul 2020
Device: The (orly) amazing Kindle Oasis 3
Quote:
Originally Posted by Frenzie View Post
I don't think you can. Is that an option in another program?
I don't know. :/
Winkelschraube is offline   Reply With Quote
Advert
Old 08-17-2020, 12:53 PM   #6
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,396
Karma: 2451781
Join Date: Apr 2014
Device: BQ Cervantes 4
See https://github.com/koreader/koreader/issues/5732. It is a non-fixable thing.

You can, of course, hack the code to write the screensaver to a jpg/png file each time a new document is opened. I would suggest to develop that on the emulator, not directly on a android device.

When you manage to modify the code you'll need to import your modified files in the program each time the program is updated. You can use a modified version of https://github.com/koreader/koreader...ation-patterns

Last edited by pazos; 08-17-2020 at 12:56 PM. Reason: I have a problem writting "directly"
pazos is offline   Reply With Quote
Old 08-17-2020, 05:01 PM   #7
Winkelschraube
Connoisseur
Winkelschraube began at the beginning.
 
Winkelschraube's Avatar
 
Posts: 98
Karma: 10
Join Date: Jul 2020
Device: The (orly) amazing Kindle Oasis 3
Wink

Quote:
Originally Posted by pazos View Post
See https://github.com/koreader/koreader/issues/5732. It is a non-fixable thing.
In this case I was asked to write in "/data/...", I just need to get a file like "/koreader/screenshots/currentcover.png".

Quote:
Originally Posted by pazos View Post
You can, of course, hack the code to write the screensaver to a jpg/png file each time a new document is opened. I would suggest to develop that on the emulator, not directly on a android device.

When you manage to modify the code you'll need to import your modified files in the program each time the program is updated. You can use a modified version of https://github.com/koreader/koreader...ation-patterns
OoOoOohhh the "rocks flavor" looks very good with the scripts. Now also apart from screensavers.

I'll have a look at the code, but I don't know any Lua. :/

Does KOReader create a log file with the last loaded file?

A suggestion from me would be a script that is executed with every document load.
Winkelschraube is offline   Reply With Quote
Old 08-17-2020, 05:36 PM   #8
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,396
Karma: 2451781
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by Winkelschraube View Post
Does KOReader create a log file with the last loaded file?
logs are written to console on the emulator and to android log buffer on android (you can retrieve them with adb logcat)

Quote:
Originally Posted by Winkelschraube View Post
A suggestion from me would be a script that is executed with every document load.
It doesn't make sense to add hooks everywhere. The program itself is a big hook (it is interpreted). You only need to rewrite the parts of the code you need. In that case the function that's called is https://github.com/koreader/koreader....lua#L537-L585

The scripts there are just for android and made sense because there's no easy way for users to customize the program on that platform.
pazos is offline   Reply With Quote
Old 08-18-2020, 12:52 PM   #9
Winkelschraube
Connoisseur
Winkelschraube began at the beginning.
 
Winkelschraube's Avatar
 
Posts: 98
Karma: 10
Join Date: Jul 2020
Device: The (orly) amazing Kindle Oasis 3
Ok the emulator is running.

But you're right, Android doesn't take a changing image file as screensaver.
Winkelschraube is offline   Reply With Quote
Old 08-19-2020, 12:51 PM   #10
Ken Maltby
Wizard
Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.Ken Maltby ought to be getting tired of karma fortunes by now.
 
Ken Maltby's Avatar
 
Posts: 4,466
Karma: 6900052
Join Date: Dec 2009
Location: The Heart of Texas
Device: Boox Note2, AuraHD, PDA,
I didn't know your Kindle PW2 was running under an Android OS, is that something you added yourself?
Ken Maltby is offline   Reply With Quote
Old 08-20-2020, 04:16 AM   #11
Winkelschraube
Connoisseur
Winkelschraube began at the beginning.
 
Winkelschraube's Avatar
 
Posts: 98
Karma: 10
Join Date: Jul 2020
Device: The (orly) amazing Kindle Oasis 3
It is a poke 2.

https://www.mobileread.com/forums/sh...1&postcount=56
Winkelschraube is offline   Reply With Quote
Old 08-25-2020, 03:26 AM   #12
elchamaco
Zealot
elchamaco will become famous soon enoughelchamaco will become famous soon enoughelchamaco will become famous soon enoughelchamaco will become famous soon enoughelchamaco will become famous soon enoughelchamaco will become famous soon enough
 
Posts: 128
Karma: 500
Join Date: Aug 2011
Device: kindle, boox
Quote:
Originally Posted by Frenzie View Post
I don't think you can. Is that an option in another program?
Calibre companion.
elchamaco is offline   Reply With Quote
Old 08-25-2020, 03:46 AM   #13
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,741
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Cool. What do you use it for?
Frenzie is offline   Reply With Quote
Old 08-25-2020, 07:08 AM   #14
elchamaco
Zealot
elchamaco will become famous soon enoughelchamaco will become famous soon enoughelchamaco will become famous soon enoughelchamaco will become famous soon enoughelchamaco will become famous soon enoughelchamaco will become famous soon enough
 
Posts: 128
Karma: 500
Join Date: Aug 2011
Device: kindle, boox
Quote:
Originally Posted by Frenzie View Post
Cool. What do you use it for?
The same, i write it to folder and the screensaver app of onyx nova shows it when it's in standby.
elchamaco is offline   Reply With Quote
Old 08-26-2020, 05:48 AM   #15
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,741
Karma: 730681
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Parts of it would be theoretically quite simple, such as writing whatever you want as the screensaver to a file. But as @pazos said it's not quite clear to me if this isn't too low-level and device specific in a way that would require running the program as root. Please see https://github.com/koreader/koreader/issues/5732
Frenzie is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Use local file as cover image jma1 Recipes 1 03-09-2020 11:14 AM
AZW3 file loading incorrect cover in kindle grapebasil Library Management 1 03-15-2018 07:41 PM
Where else can a MOBI file have its cover image? Alissa Kindle Formats 6 07-13-2013 02:50 PM
Books loading into document file Mumgod Kindle Fire 14 02-07-2012 05:37 AM
Document converter (to pdf or image file) Bob Russell Lounge 1 09-09-2004 04:01 PM


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


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