KOReader ships with the hello.koplugin test-plugin in the plugins/ folder. You can use that as a template to make your own. Remove the first clode block in main.lua to activate it (you may then also need to check the box to activate it in the plugin-settings) and see how it works.
To create your own, copy the hello.koplugin folder to plugins/myscript.koplugin (or whatever), and rename the script's name and menu entry in the code. Of course also add your own code to execute on pressing the new menu entry.
|