Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-31-2019, 12:35 PM   #1
handyguy
Connoisseur
handyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to behold
 
handyguy's Avatar
 
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"}
        ]
}
In /bin/clock.sh:
Code:
#!/bin/sh
. /mnt/us/python/bin/python2.7
/mnt/us/extensions/clock/c2.py
Clock does show up as an option within KUAL, but fails to run, and the following error message is found in the KUAL log:
Quote:
/tmp/klauncher_background-6670879356155924107.sh: line 2: bin/clock.sh: not found
I have tried the full path to the file and with/without double quotes.

Any ideas?
Thanks for the assistance!
handyguy is offline   Reply With Quote
Old 12-31-2019, 12:54 PM   #2
Junket
Nil adsuetudine maius
Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.
 
Junket's Avatar
 
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.
Junket is offline   Reply With Quote
Advert
Old 12-31-2019, 01:06 PM   #3
JimmyR
ɴₐɴ
JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.
 
JimmyR's Avatar
 
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.
JimmyR is offline   Reply With Quote
Old 12-31-2019, 01:36 PM   #4
handyguy
Connoisseur
handyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to behold
 
handyguy's Avatar
 
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"}
	]
}
handyguy is offline   Reply With Quote
Old 12-31-2019, 02:05 PM   #5
JimmyR
ɴₐɴ
JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.
 
JimmyR's Avatar
 
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...
JimmyR is offline   Reply With Quote
Advert
Old 12-31-2019, 02:20 PM   #6
Junket
Nil adsuetudine maius
Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.
 
Junket's Avatar
 
Posts: 278
Karma: 500000
Join Date: Nov 2019
Location: US
Device: PW4
That's a common stumbling block and worth checking. Windows/Dos uses "\r\n" for EOL. While *nix is just a line feed "\n" for a new line.


Notepad++ (conversion):

Junket is offline   Reply With Quote
Old 12-31-2019, 02:25 PM   #7
Junket
Nil adsuetudine maius
Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.Junket ought to be getting tired of karma fortunes by now.
 
Junket's Avatar
 
Posts: 278
Karma: 500000
Join Date: Nov 2019
Location: US
Device: PW4
Notepad++ (new document format):

Junket is offline   Reply With Quote
Old 12-31-2019, 02:29 PM   #8
JimmyR
ɴₐɴ
JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.
 
JimmyR's Avatar
 
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.
JimmyR is offline   Reply With Quote
Old 12-31-2019, 02:29 PM   #9
handyguy
Connoisseur
handyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to behold
 
handyguy's Avatar
 
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)
handyguy is offline   Reply With Quote
Old 12-31-2019, 02:38 PM   #10
JimmyR
ɴₐɴ
JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.
 
JimmyR's Avatar
 
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.
JimmyR is offline   Reply With Quote
Old 12-31-2019, 06:50 PM   #11
handyguy
Connoisseur
handyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to behold
 
handyguy's Avatar
 
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!
handyguy is offline   Reply With Quote
Old 12-31-2019, 08:48 PM   #12
handyguy
Connoisseur
handyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to beholdhandyguy is a marvel to behold
 
handyguy's Avatar
 
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
handyguy is offline   Reply With Quote
Old 12-31-2019, 11:07 PM   #13
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
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.
NiLuJe is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 07:23 AM.


MobileRead.com is a privately owned, operated and funded community.