roygbyte / crossword.koplugin

Crosswords on your KOReader device
GNU Affero General Public License v3.0
12 stars 2 forks source link

Doesn't show up in plugin management #2

Closed junnunkarim closed 2 years ago

junnunkarim commented 2 years ago

I am using a jailbroken kindle voyage. I have did the all the instructions from the readme but crossword isn't showing up in plugin management. Other plugins like calculator shows up but crossword isn't. What could be the issue?

roygbyte commented 2 years ago

Hi @junnunkarim! You'll find the plugin under the left-most menu item in the toolbar. (I can't remember what the button is called... When you swipe down to show the toolbar, choose the option at the very left.)

Probably, it's not the best place for the plugin. (The decision to put it there is a hold-over from when I was developing it).

junnunkarim commented 2 years ago

Hello There @roygbyte! Isn't the plugin menu in the <tool_icon>/more_tools section? But I did search everywhere in the menu, still I couldn't find it. I also added the calculator plugin from https://github.com/koreader/contrib and it shows up fine under <tool_icon>/more_tools. But the crossword plugin is not showing up. Btw my koreader version is 2022.03.1

roygbyte commented 2 years ago

Oh, that is strange. I defined the sorting_hint here:

https://github.com/roygbyte/crossword.koplugin/blob/39fce98e932e3dd3630f1867397a01a2ed125bba/main.lua#L43-L51

You could try changing the value of sorting_hint to "more_tools" and that may resolve your issue.

junnunkarim commented 2 years ago

You could try changing the value of sorting_hint to "more_tools" and that may resolve your issue.

Well, I just tested it but still not showing up. What version of koreader are you using? Did they change any plugin related functions in the latest version?

roygbyte commented 2 years ago

Could also be that there is a bug in my code! I will checkout the repo later tonight and run luacheck plugins/crossword.koplugin/* to see if the Lua script has errors.

One more thing, did you do this:

Initialize the submodule (run git submodule update --init inside the crossword.koplugin folder)

junnunkarim commented 2 years ago

Sorry for the late reply. Yes, I did clone the submodule.

roygbyte commented 2 years ago

Not sure what the issue could be! But I'm determined to figure this out!! Nothing would make me happier than knowing someone other than me is enjoying this plugin 😊

It may or may not make a difference, but I pushed an update to the code last night. You might try to give that a go?

junnunkarim commented 2 years ago

Hey Thanks. I respect your determination and goodwill.

I did try out the latest commit but still the problem exists. Btw what version of koreader are you using? I think I should try out that version.

roygbyte commented 2 years ago

I am using 2022.02 on my Kobo, but 2022.03 on my emulator.

It could be worth looking inside the crash.log file. Maybe check to see if the plugin is at least loaded along with the other plugins, like evidenced below:

04/30/22-15:58:13 DEBUG FM loaded plugin autosuspend at plugins/autosuspend.koplugin
04/30/22-15:58:13 DEBUG FM loaded plugin autowarmth at plugins/autowarmth.koplugin
04/30/22-15:58:13 DEBUG FM loaded plugin backgroundrunner at plugins/backgroundrunner.koplugin
04/30/22-15:58:13 DEBUG FM loaded plugin batterystat at plugins/batterystat.koplugin
04/30/22-15:58:13 DEBUG FM loaded plugin bookshortcuts at plugins/bookshortcuts.koplugin
04/30/22-15:58:13 DEBUG FM loaded plugin calibre at plugins/calibre.koplugin
04/30/22-15:58:13 DEBUG FM loaded plugin coverbrowser at plugins/coverbrowser.koplugin
04/30/22-15:58:13 DEBUG FM loaded plugin crossword at plugins/crossword.koplugin
junnunkarim commented 2 years ago

I took a look at the crash log (debug logging turned off) and it seems koreader can't find a module named gridinput.

05/21/22-15:58:55 INFO  Loading plugins from directory: plugins
ffi.load: sqlite3
05/21/22-15:58:56 WARN  Error when loading plugins/crossword.koplugin/main.lua plugins/crossword.koplugin/gridview.lua:17: module 'gridinput' not found:
    no field package.preload['gridinput']
    no file 'plugins/crossword.koplugin/gridinput.lua'
    no file 'common/gridinput.lua'
    no file 'rocks/share/lua/5.1/gridinput.lua'
    no file 'frontend/gridinput.lua'
    no file './gridinput.lua'
    no file '/usr/local/share/luajit-2.1.0-beta3/gridinput.lua'
    no file '/usr/local/share/lua/5.1/gridinput.lua'
    no file '/usr/local/share/lua/5.1/gridinput/init.lua'
    no file 'plugins/crossword.koplugin/lib/gridinput.so'
    no file 'common/gridinput.so'
    no file 'common/gridinput.dll'
    no file '/usr/lib/lua/gridinput.so'
    no file 'rocks/lib/lua/5.1/gridinput.so'
    no file './gridinput.so'
    no file '/usr/local/lib/lua/5.1/gridinput.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'
roygbyte commented 2 years ago

Welp, that bug was totally my doing. A good reminder for me to test from a fresh checkout, and not always my working directory.

junnunkarim commented 2 years ago

Thanks, it works now.