Ajatt-Tools / anki.koplugin

KOReader plugin enabling Anki card generations for words looked up in the internal dictionary.
56 stars 6 forks source link

Can not install on Kobo #28

Closed TonioBanderas closed 3 months ago

TonioBanderas commented 3 months ago

Hello nairyosangha, I am very thankful for your work. I managed to get your plugin running on my koreader on android. But now that I try to use it on my Kobo I run into an issue. Here is what the crash.log is saying:

06/30/24-02:23:16 ERROR Failed to initialize anki plugin: plugins/anki.koplugin/main.lua:88: .../plugins/anki.koplugin/extensions/._EXT_pitch_accent.lua:1: unexpected symbol

I tried deleting this perticular _EXT_pitch_accent.lua as I do not use it, still the error did not go away. I tried just to comment out the entire function in main.lua which loads these extensions... but then things started to go very sideways ^^ I am just not proficient enough in any of this. I could just fiddle around with it until something kinda works. How come it works just fine on my Android phone, but here it does not?

nairyosangha commented 3 months ago

._EXT_pitch_accent.lua

I think the issue here is macOS, this plugin does not have any files with the ._ prefix, but it is trying to parse it as if it's a lua file. I believe it should work if you just delete those invisible files.

That said, the pattern I'm using is too lenient, the file in question here doesn't actually start with the EXT_ prefix, it starts with ._EXT_ so I've fixed that: https://github.com/Ajatt-Tools/anki.koplugin/commit/bda12459abb0c728c4fa006797932d081a656612

TonioBanderas commented 3 months ago

You are the man, sir! Thank you so much!! :))

nairyosangha commented 3 months ago

Let me know if anything else is wrong, if not you can close the issue

I closed it for you, feel free to reopen if something is still messed up