12-31-2019, 12:35 PM | #1 | |
Connoisseur
Posts: 70
Karma: 11789
Join Date: Dec 2019
Device: PW4
|
Help adding app to KUAL
Hi all,
I am trying to add a python script as an option within KUAL. I have created what I understand are the folder structure and files needed. e.g. extensions/clock and extensions/clock/bin In /clock are the two files menu.json and config.xml In /bin are clock.sh and all the python programs config.xml contents: Code:
{ "items": [ {"name": "Clock", "priority": 1, "action": "bin/clock.sh"} ] } Code:
#!/bin/sh . /mnt/us/python/bin/python2.7 /mnt/us/extensions/clock/c2.py Quote:
Any ideas? Thanks for the assistance! |
|
12-31-2019, 12:54 PM | #2 |
Nil adsuetudine maius
Posts: 278
Karma: 500000
Join Date: Nov 2019
Location: US
Device: PW4
|
Sounds like a simple path/syntax/typo kind of error. What we know for sure is that the launcher isn't seeing clock.sh for some reason.
e.g. wouldn't "./bin/clock.sh" be a better defined path? Probably the simplest check would be to look at a few extensions from the snapshot thread and compare the path syntax there to how your script is formatted. |
Advert | |
|
12-31-2019, 01:06 PM | #3 |
ɴₐɴ
Posts: 421
Karma: 2507940
Join Date: Jun 2011
Location: 37.2N 93.3W
Device: KV PW4 PW3 PW2
|
Are you using notepad on Windows by chance? If so, you need a text editor that supports Unix line endings. Notepad++ is good. Scripts saved with windows line endings will cause those types of issues with scripts.
|
12-31-2019, 01:36 PM | #4 |
Connoisseur
Posts: 70
Karma: 11789
Join Date: Dec 2019
Device: PW4
|
I originally created the files on Windows with Notepad++, currently editing them locally on the Kindle with Leafpad. To be sure, I just recreated it with Notepad++
Tried "./bin/clock.sh" and received the same error. Looked at the .json file for leafpad, and it's the same contents: Code:
{ "items": [ {"name": "Leafpad", "priority": 1, "action": "bin/leafpad.sh"} ] } |
12-31-2019, 02:05 PM | #5 |
ɴₐɴ
Posts: 421
Karma: 2507940
Join Date: Jun 2011
Location: 37.2N 93.3W
Device: KV PW4 PW3 PW2
|
Notepad++ defaults to Windows line endings. Did you switch it to Unix? Right click on the status bar near the right side. You can also set the default in Settings > Preferences > New Document.
I apologize if you already did all this... |
Advert | |
|
12-31-2019, 02:20 PM | #6 |
Nil adsuetudine maius
Posts: 278
Karma: 500000
Join Date: Nov 2019
Location: US
Device: PW4
|
|
12-31-2019, 02:25 PM | #7 |
Nil adsuetudine maius
Posts: 278
Karma: 500000
Join Date: Nov 2019
Location: US
Device: PW4
|
|
12-31-2019, 02:29 PM | #8 |
ɴₐɴ
Posts: 421
Karma: 2507940
Join Date: Jun 2011
Location: 37.2N 93.3W
Device: KV PW4 PW3 PW2
|
Another common problem happens when you have known file type extensions hidden. You can inadvertently end up with a file name like myscript.sh.txt and not realize it.
Probably would have noticed that in leafpad, however. |
12-31-2019, 02:29 PM | #9 |
Connoisseur
Posts: 70
Karma: 11789
Join Date: Dec 2019
Device: PW4
|
Worth a shot, no luck. Checked Notepad++ and EOL is UNIX (greyed out from EOL conversion option)
|
12-31-2019, 02:38 PM | #10 |
ɴₐɴ
Posts: 421
Karma: 2507940
Join Date: Jun 2011
Location: 37.2N 93.3W
Device: KV PW4 PW3 PW2
|
Can you zip up your clock directory and attach it to a post? It would be easier to troubleshoot if we can see all the files in their current locations.
|
12-31-2019, 06:50 PM | #11 |
Connoisseur
Posts: 70
Karma: 11789
Join Date: Dec 2019
Device: PW4
|
Well, you had the right idea. menu.json was ok, but the subsequent file had the wrong EOL: clock.sh. Working now; thanks!
|
12-31-2019, 08:48 PM | #12 |
Connoisseur
Posts: 70
Karma: 11789
Join Date: Dec 2019
Device: PW4
|
I would now like to add it to the Kindle home screen, but I presume that is substantially more difficult? I found this:
https://www.mobileread.com/forums/sh...et+home+screen |
12-31-2019, 11:07 PM | #13 |
BLAM!
Posts: 13,477
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Kindlets have been essentially unsupported since FW 5.5.x, so, you're in for a world of pain. Booklets, on the other hand, are supported, but the API is private, and now has key bits of it obfuscated...
c.f., the hoop-jumping involved to get KUAL running almost everywhere... . EDIT: As I can't remember whether that's specified somewhere in the docs, the repo of the mangled Booklet variant for current FWs is here: https://github.com/NiLuJe/KUAL_Booklet (it links to the main repo, so you get everything). Last edited by NiLuJe; 12-31-2019 at 11:18 PM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bump KUAL KUAL+ extention | j.p.s | Kindle Developer's Corner | 10 | 10-24-2019 03:04 PM |
Adding Lua support to KUAL-system | knc1 | Kindle Developer's Corner | 26 | 04-27-2016 09:36 AM |
Battery % in the tray - KUAL app for kindles is now READY! | Aeris | Kindle Developer's Corner | 93 | 02-07-2016 10:03 AM |
Adding books to Kindle app? | JDG90 | Apple Devices | 9 | 12-04-2012 11:39 PM |
Adding my own books to the Kobo app | ezziriah | Android Devices | 9 | 09-12-2011 11:24 PM |