Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-19-2017, 02:37 AM   #31
Yourcat
Groupie
Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.
 
Posts: 175
Karma: 54048
Join Date: Mar 2016
Device: PW3 5.6.5-usbnet
Simply replace it, the pipe is supported within backticks. Anyhow `date +%X|cut -d':' -f-2` is much faster, no need for sed here.
Also the regexps in awk should be optimized. '.*' matches the whole line and then the regexp engine goes back one character after the other and tries to match the following string. The longer the lines are the more CPU is used. I expect that the log lines are formatted and one could use a regexp without '*' - it may look complicated but it will match faster.
Yourcat is offline   Reply With Quote
Old 02-19-2017, 02:47 AM   #32
Yourcat
Groupie
Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.
 
Posts: 175
Karma: 54048
Join Date: Mar 2016
Device: PW3 5.6.5-usbnet
If you want to use sed use " instead of '.
' ... ` ... '... ' ` ... ' --> ' ... ` ... " ... "` ... '
Yourcat is offline   Reply With Quote
Old 02-19-2017, 06:54 AM   #33
Hanspeter
Connoisseur
Hanspeter began at the beginning.
 
Posts: 59
Karma: 14
Join Date: Jul 2014
Device: Kindel PW1, Voyager
Hi Yourcat,

thanks for your hints.

Quote:
Originally Posted by Yourcat View Post
Simply replace it, the pipe is supported within backticks. Anyhow `date +%X|cut -d':' -f-2` is much faster, no need for sed here.
Good point to use cut instead of sed. But for me it has the same problem as the command includes an additional ':'. If you look into the awk command I aöready have two nested hypens and I have no idea how to add the third once without braking the code.

Code:
awk '/.*PageTurnAction*./ || /.*JunoExecutionManager*./  {system("eips ${POS} ${ROW} \"`date +%H:%M`\"")}'
Quote:
Originally Posted by Yourcat View Post
Also the regexps in awk should be optimized. '.*' matches the whole line and then the regexp engine goes back one character after the other and tries to match the following string. The longer the lines are the more CPU is used. I expect that the log lines are formatted and one could use a regexp without '*' - it may look complicated but it will match faster.
I'm not the best in regexp and awk. I simply copied the line from an other post. That is what the log looks like including a line with the PageTurnAction that triggers the display of the information.

Code:
170211:114536 cvm[5359]: I LprHandler:Information::Not showing dialog since LPR does not exist
170211:114542 cvm[5359]: I LprHandler:Information::Not showing dialog since LPR does not exist
170211:114545 powerd[3080]: I lipc:evts:name=t1TimerReset, origin=com.lab126.powerd:Event sent
170211:114545 cvm[5359]: I GlobalKeyEventDispatcher:Information::Receiving WhisperTouch key event
170211:114545 cvm[5359]: I LprHandler:Information::Not showing dialog since LPR does not exist
170211:114545 cvm[5359]: I ContentPanel:UserActionInfo:PageTurnAction=NextPage:
170211:114545 winmgr[3881]: I Inverting the page turns. currentOrientation=U:::
170211:114545 winmgr[3881]: I WindowManager:handleWhisperTouchPress:forwarding wt press to
HaPe
Hanspeter is offline   Reply With Quote
Old 02-19-2017, 08:36 AM   #34
knc1
99.44/100% On Holiday
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 16,467
Karma: 17368216
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
I do believe you are over thinking this whole thing.
Code:
170211:114545 cvm[5359]: I ContentPanel:UserActionInfo:PageTurnAction=NextPage:
Reading that line, left to right:
YYMMDD:HHMMSS taskname[thread]: I ....
knc1 is offline   Reply With Quote
Old 02-20-2017, 01:36 PM   #35
Yourcat
Groupie
Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.Yourcat knows the way to San Jose.
 
Posts: 175
Karma: 54048
Join Date: Mar 2016
Device: PW3 5.6.5-usbnet
Sorry, I overlooked your use of multiple quotes. I didn't test it on my Kindle but hopefully the one or the other command works there:
cat /tmp/messages | awk -v date="$(date +%X | cut -d':' -f-2)" '/^[0-9:]++ [a-z]++.[0-9]++.: I [a-zA-Z]++:[a-zA-Z]++PageTurnAction|Foo)/ {system("echo ffff "date)}'


Using strftime my awk version returns the 24h format while gawk works fine.
cat /tmp/messages | awk '/^[0-9:]++ [a-z]++.[0-9]+.: I [a-zA-Z]++:[a-zA-Z]++PageTurnAction|Foo)/ {date=substr(strftime("%X"),0,5); system("echo ffff "date)}'

You should really optimize the expressions to avoid backtracking - with your expression this may happen 4 times for each character in every line if the line does not match.
http://stackoverflow.com/questions/3...tomic-grouping is interesting.
Yourcat is offline   Reply With Quote
Old 05-28-2017, 06:42 AM   #36
jacko5
Member
jacko5 began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Jan 2011
Device: Sony PRS 600
Does this work on a Kindle Paperwhite 5th gen ?
I cannot find a folder called "extension" on my kindle.
I made a folder called extension and copied the files inside and restarted the kindle but the clock does not show up.
I am on original kindle firmware 5.8.9
Thanks.
jacko5 is offline   Reply With Quote
Old 05-28-2017, 08:01 AM   #37
knc1
99.44/100% On Holiday
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 16,467
Karma: 17368216
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by jacko5 View Post
Does this work on a Kindle Paperwhite 5th gen ?
I cannot find a folder called "extension" on my kindle.
I made a folder called extension and copied the files inside and restarted the kindle but the clock does not show up.
I am on original kindle firmware 5.8.9
Thanks.
What devices does this thread mention it has been tested on? *

That is because you have not installed the KUAL launcher when you jail broke your Kindle.

What does this thread say about the versions it has been tested on? *

* The 'Usual Practice' here is to put all of that information in the first post, but this thread was not done that way by the author.

Last edited by knc1; 05-28-2017 at 08:11 AM.
knc1 is offline   Reply With Quote
Old 05-28-2017, 08:36 AM   #38
baalajimaestro
Expecto Patronum!
baalajimaestro ought to be getting tired of karma fortunes by now.baalajimaestro ought to be getting tired of karma fortunes by now.baalajimaestro ought to be getting tired of karma fortunes by now.baalajimaestro ought to be getting tired of karma fortunes by now.baalajimaestro ought to be getting tired of karma fortunes by now.baalajimaestro ought to be getting tired of karma fortunes by now.baalajimaestro ought to be getting tired of karma fortunes by now.baalajimaestro ought to be getting tired of karma fortunes by now.baalajimaestro ought to be getting tired of karma fortunes by now.baalajimaestro ought to be getting tired of karma fortunes by now.baalajimaestro ought to be getting tired of karma fortunes by now.
 
baalajimaestro's Avatar
 
Posts: 137
Karma: 342260
Join Date: May 2017
Location: Chennai, India
Device: Kindle PW2(9017) 4GB, FW 5.7.4
Quote:
Originally Posted by jacko5 View Post
Does this work on a Kindle Paperwhite 5th gen ?
I cannot find a folder called "extension" on my kindle.
I made a folder called extension and copied the files inside and restarted the kindle but the clock does not show up.
I am on original kindle firmware 5.8.9
Thanks.
@jacko5:Please Reply to this:

1. Is the device you are referring to jailbroken?
2. Did you install KUAL azw2/KUAL Booklet as per your device?
3. If it was KUAL Booklet, did you update it after fw upgrade?

If the answers to all the above are yes then you must have KUAL showing up a menu item called Showtime.

Also the fact that extensions folder is missing seems like either you havent jailbroken your kindle or not yet installed KUAL.

If not jailbroken, then you cannot use this KUAL addon until you jailbreak it!

BTW, It cannot be a PW1(5th gen) as updates stopped from 5.6.1.1 for that kindle. Please mention the first 4 letters/digits of your Kindle serial number to make diagnostics easy.

You can also refer to the perfect nickname of your kindle from this Link.

Please check back and report Sir!

Last edited by baalajimaestro; 05-28-2017 at 08:47 AM.
baalajimaestro is offline   Reply With Quote
Old 01-07-2018, 06:34 PM   #39
poczynek
Member
poczynek began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Jan 2017
Device: Kindle Oasis
Quote:
Originally Posted by Hanspeter View Post
Hi Yourcat,

thanks for your hints.



Good point to use cut instead of sed. But for me it has the same problem as the command includes an additional ':'. If you look into the awk command I aöready have two nested hypens and I have no idea how to add the third once without braking the code.

Code:
awk '/.*PageTurnAction*./ || /.*JunoExecutionManager*./  {system("eips ${POS} ${ROW} \"`date +%H:%M`\"")}'


I'm not the best in regexp and awk. I simply copied the line from an other post. That is what the log looks like including a line with the PageTurnAction that triggers the display of the information.

Code:
170211:114536 cvm[5359]: I LprHandler:Information::Not showing dialog since LPR does not exist
170211:114542 cvm[5359]: I LprHandler:Information::Not showing dialog since LPR does not exist
170211:114545 powerd[3080]: I lipc:evts:name=t1TimerReset, origin=com.lab126.powerd:Event sent
170211:114545 cvm[5359]: I GlobalKeyEventDispatcher:Information::Receiving WhisperTouch key event
170211:114545 cvm[5359]: I LprHandler:Information::Not showing dialog since LPR does not exist
170211:114545 cvm[5359]: I ContentPanel:UserActionInfo:PageTurnAction=NextPage:
170211:114545 winmgr[3881]: I Inverting the page turns. currentOrientation=U:::
170211:114545 winmgr[3881]: I WindowManager:handleWhisperTouchPress:forwarding wt press to
HaPe
This time and percertage hack has been my lifesaver! Love it!

However i have updated to the latest Oasis firmware and the Kual extension does not work.

Any other way of getting it to work?

Thanks again.
poczynek is offline   Reply With Quote
Old 01-07-2018, 08:47 PM   #40
knc1
99.44/100% On Holiday
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 16,467
Karma: 17368216
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Create a RUNME.sh script for the purpose and launch it with the search bar command:
;log runme
knc1 is offline   Reply With Quote
Old 01-07-2018, 09:26 PM   #41
poczynek
Member
poczynek began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Jan 2017
Device: Kindle Oasis
Quote:
Originally Posted by knc1 View Post
Create a RUNME.sh script for the purpose and launch it with the search bar command:
;log runme
So sorry but are you able to give specific instructions? I have created a sh file in the root of my kindle called RUNME.sh - do i then put showtime extension code into that file and then try ;log runme?
poczynek is offline   Reply With Quote
Old 01-08-2018, 10:34 AM   #42
knc1
99.44/100% On Holiday
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 16,467
Karma: 17368216
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by poczynek View Post
So sorry but are you able to give specific instructions? I have created a sh file in the root of my kindle called RUNME.sh - do i then put showtime extension code into that file and then try ;log runme?
Let someone else help you.
knc1 is offline   Reply With Quote
Old 01-08-2018, 02:42 PM   #43
poczynek
Member
poczynek began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Jan 2017
Device: Kindle Oasis
Quote:
Originally Posted by knc1 View Post
Let someone else help you.
No problem.

Sent from my SM-G955F using Tapatalk
poczynek is offline   Reply With Quote
Old 01-09-2018, 08:54 AM   #44
Antinoos
Groupie
Antinoos rocks like Gibraltar!Antinoos rocks like Gibraltar!Antinoos rocks like Gibraltar!Antinoos rocks like Gibraltar!Antinoos rocks like Gibraltar!Antinoos rocks like Gibraltar!Antinoos rocks like Gibraltar!Antinoos rocks like Gibraltar!Antinoos rocks like Gibraltar!Antinoos rocks like Gibraltar!Antinoos rocks like Gibraltar!
 
Antinoos's Avatar
 
Posts: 160
Karma: 100329
Join Date: Apr 2017
Location: Leipzig/Germany
Device: PW3, KT3 (fw 5.8.11 with jb)
A while ago, I made the following minimal changes to the code of showtime.sh when displaying time & battery percentage (two occurrences - lines 301 and 318):
Code:
{system("eips ${POS} ${ROW} `date +%H:%M`_\[`gasgauge-info -s`\]")}
Line 285 should read:
Code:
export POS="$((${EIPS_MAXCHARS} - 13))"
This adds square brackets around the percent value, what looks much better:
- old: 13:55-99
- new: 13:55_[99]
Tested even with the special case "100% charge" which requires 11 chars for the whole string.

For your convenience, I've added the new version 1.2a as ZIP file:
Attached Files
File Type: zip KUAL_showtime_12a.zip (3.6 KB, 38 views)

Last edited by Antinoos; 01-16-2018 at 08:39 AM. Reason: added archive attachment
Antinoos is offline   Reply With Quote
Old 01-08-2019, 01:19 AM   #45
mergen3107
Connoisseur
mergen3107 began at the beginning.
 
mergen3107's Avatar
 
Posts: 66
Karma: 14
Join Date: Feb 2012
Location: Cape Canaveral
Device: KPW3 (5.9.7 JB); Kindle 4NT Black (4.1.3 JB)
Wow guys! This is a very exciting extension!
You know what I am still dreaming about since Kindle 4 Non-Touch?
A progress bar during reading! There is plenty of space at the bottom, between page location and progress percentage.
I hope it would be relatively easy to find a position, total book chapters, etc, and draw it with eips (or FBInk?) at (not) every page turn.
Do you have any ideas where should I start digging, before I start looking ixtab's JBPatch for old firmwares? I remember he did that somehow...
mergen3107 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Show current time while reading encol Kindle Developer's Corner 17 01-11-2017 04:09 PM
xmahjongg for Kindle as Kual extension Hanspeter Kindle Developer's Corner 86 12-02-2016 08:06 PM
kual extension to open a book shoelesshunter Kindle Developer's Corner 14 08-16-2016 01:30 PM
Is there a Kual Extension/add-on for cloud eduardomb Kindle Developer's Corner 19 07-08-2016 06:43 PM
PRS-T2 Current time while reading chemi Sony Reader 5 01-07-2013 03:18 PM


All times are GMT -4. The time now is 10:09 PM.


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