View Single Post
Old 04-13-2025, 08:50 PM   #3
beecom
Enthusiast
beecom can extract oil from cheesebeecom can extract oil from cheesebeecom can extract oil from cheesebeecom can extract oil from cheesebeecom can extract oil from cheesebeecom can extract oil from cheesebeecom can extract oil from cheesebeecom can extract oil from cheese
 
Posts: 40
Karma: 1000
Join Date: Jun 2022
Device: Kindle Oasis
Quote:
Originally Posted by pazos View Post
KOReader is in itself a big lua script.

It provides a way to execute your own on demand if you write a plugin.

It also provides hooks that get called automatically and are useful to write your own user patches.

Both patches and plugins are executed on the same vm as ko does, so issuing os.exit it isn't going to exit your script but the whole program.
Thanks for your reply.
I was wondering if there's a way to add a script (which is not directly related to KOReader) into KOReader's menu so that I can see and run it from there.

What I'm trying to do is have a script stored on the Kindle that detects when the file /tmp/pc.png is updated (which is periodically refreshed from my PC), and then re-renders the screen using that updated image. I'd like to be able to trigger this script from within KOReader.
beecom is offline   Reply With Quote