09-18-2013, 03:42 AM | #1 |
Developer's Corner Mascot
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
To programmers: help for a little "battery Report" app improvement
Hi there!
I'm not a programmer so I need a little help for a Kual App... I really like the Battery Report app (it is the only one that shows me the battery charge percentage at the moment)... but I don't like one thing of it: it creates a status text report in the documents folder and you must check it from here, like a book. I'd really prefer not having these information logged, or at least not in documents folder, and automatically displayed on the screen for a while (as "Back Door Lock -> Lock state" does, for example). Can anybody help? Thank you! Link to Battery Report: https://www.mobileread.com/forums/sho...5&postcount=11 Link to Back Door Lock: https://www.mobileread.com/forums/sho...7&postcount=25 |
09-18-2013, 04:07 AM | #2 |
Evangelist
Posts: 456
Karma: 1287375
Join Date: Jan 2013
Location: West Gardiner, Maine
Device: Touch (5.3.7)
|
I don't see an automatic display in the back door hack, but in this line:
mv $LOG '/mnt/us/documents/'$RPT'.txt' just change it to: mv $LOG '/mnt/us/'$RPT'.txt' and it won't show up as a book. you can still read it if you want by sshing in or whatever. |
Advert | |
|
09-18-2013, 04:23 AM | #3 | |
Developer's Corner Mascot
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
Quote:
The script used from Back Door Lock to display the status is named lockstat.sh Last edited by Aeris; 09-18-2013 at 04:26 AM. |
|
09-18-2013, 04:26 AM | #4 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
|
09-18-2013, 04:29 AM | #5 |
Developer's Corner Mascot
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
Yes I know... it was just an example. I only would like to have the battery file report shown instantly when i press the Kual app link, also an "hello world" approach would be great for me if I was be able doing it xD
|
Advert | |
|
09-18-2013, 04:34 AM | #6 |
(offline)
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Code:
eips 1 2 "Hello World" Learning by doing! PS: You can also use Code:
eips 1 2 "Hello World" -h Last edited by ixtab; 09-18-2013 at 04:47 AM. |
09-18-2013, 04:39 AM | #7 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
And what you want displayed is the output of:
Code:
gasgauge-info -c I think that Amazon's gasgauge-info script already munges the percentage sign into the numeric string on all firmware versions, If so, then Code:
eips 1, 2 `gasgauge-info -c` Note: Those are back-ticks, not single quotes. And since it is a single command, you don't need a bin/shell-script.sh to get it done, just put it as the 'action: ' in the menu.json of your new button. (Unless the version-2 KUAL parser broke that feature. The version-2 parser is a bit annal in the things it will accept.) Last edited by knc1; 09-18-2013 at 04:53 AM. |
09-18-2013, 05:03 AM | #8 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
I may have something for that... *rummages around*
|
09-18-2013, 05:12 AM | #9 |
Developer's Corner Mascot
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
Ahah it a bit sh*tty but it works, thanks xD But if i change the x and y doesn't display at all o.O
Does it leave a terminal opened after executing the command? (I'd like it to close after showing me what I want). I've tryed to append: sleep 5 exit but didn't work Last edited by Aeris; 09-18-2013 at 05:21 AM. |
09-18-2013, 05:21 AM | #10 |
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
|
OSD thingy. Not shitty. Well... less shitty..
https://www.mobileread.com/forums/sho...d.php?t=222781 |
09-18-2013, 05:33 AM | #11 |
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
|
Wee, everyone tried something different, so, here's my take, with eips
Tested on a K2/3/4/Touch/PW/PW2 . @knc1: What's the issue and and on which devices with Backdoor Lock's eips calls? PSA: All downloads have been moved to the Snapshots thread! Last edited by NiLuJe; 06-04-2019 at 01:33 PM. Reason: Bump to 1.1.N |
09-18-2013, 05:39 AM | #12 |
Developer's Corner Mascot
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
Thank you all guys, you are so kind! I think that aOSD will be useful to me, Twobob! Only have to understand how make it work with terminal outputs and not simple strings..
Niluje, that's exactly what i wanted to do! Thank you Last edited by Aeris; 09-18-2013 at 05:41 AM. |
09-18-2013, 05:53 AM | #13 | |
(offline)
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
|
Quote:
There are more possibilities, but all of them are "standardized", so once you know how to use them, you can apply that for pretty much any situation. You should find information about these in any decent shell programming tutorial. hth |
|
09-18-2013, 06:01 AM | #14 |
Developer's Corner Mascot
Posts: 486
Karma: 1277790
Join Date: Sep 2013
Device: Kindle Paperwhite 5.3.4, Kindle Keyboard 3.4
|
@ixtab: Perfect! I hope to make some nice kindlet too, soon or later Now I've something to start with!
@niluje: I've modified something (eips) to make it show better on kindle paperwhite (don't know on others...) |
09-18-2013, 06:18 AM | #15 |
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
|
@Aeris: I was wondering if centering it wouldn't work better .
I have a bit of something that auto-centers eips calls somewhere, let me try something... |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pocket Pro 5" Is the battery "Nokia" compatible for real?? | wayamauro | Astak EZReader | 76 | 02-24-2020 03:48 AM |
"This American Life" retracts its Apple/Foxconn report | Andrew H. | News | 4 | 03-16-2012 10:15 PM |
SONY pocket edition: "Device locked" + "charge battery" obstacles? | hermes | Devices | 3 | 06-02-2011 03:32 AM |
British report takes aim at copyright "lobbynomics" | GA Russell | News | 3 | 05-22-2011 02:06 PM |
"Meditations", a unique self improvement book | vminniti | Self-Promotions by Authors and Publishers | 16 | 10-05-2010 12:21 PM |