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 02-06-2017, 09:11 PM   #16
knc1
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by Hanspeter View Post
Hi,

added a new version to the first post where you can select if the time should be displayed in row 0 or row 1.

Also there is a action to copy the system log, that is used to find the page turns, into the showtime/bin directory. Start the extension on the touch, open a book, scroll some pages, got to the main menu with the wrong display, open kual as select the copy system log action. Then attach the messages.log here.

HaPe
It would be a nice thing for the newbies if the archive name did not have a space in it.
knc1 is offline   Reply With Quote
Old 02-06-2017, 10:11 PM   #17
poczynek
Zealot
poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.
 
Posts: 114
Karma: 26552
Join Date: Jan 2017
Device: Kobo Forma
I have a Kindle Oasis and mine only works after i go to Kual and use the Showtime Button and then it only works for that page i am reading and then goes after that. Anything else i need to do?
poczynek is offline   Reply With Quote
Advert
Old 02-10-2017, 03:16 PM   #18
Hanspeter
Connoisseur
Hanspeter doesn't litterHanspeter doesn't litter
 
Posts: 77
Karma: 150
Join Date: Jul 2014
Device: Kindel PW1, Voyager
Quote:
Originally Posted by knc1 View Post
It would be a nice thing for the newbies if the archive name did not have a space in it.
ok, done
Hanspeter is offline   Reply With Quote
Old 02-10-2017, 03:19 PM   #19
Hanspeter
Connoisseur
Hanspeter doesn't litterHanspeter doesn't litter
 
Posts: 77
Karma: 150
Join Date: Jul 2014
Device: Kindel PW1, Voyager
Quote:
Originally Posted by poczynek View Post
I have a Kindle Oasis and mine only works after i go to Kual and use the Showtime Button and then it only works for that page i am reading and then goes after that. Anything else i need to do?
I do not one that model. Please do the following:
1) open Kual => Showtime, select the Showtime button
2) open a book and scroll some pages
2) open Kual => Showtime, select "Copy system log"
3) connect your Kindel to the coputer and open the x:/extensions/showtime/bin/ folder
4) attacht the both *.log filese here

HaPe
Hanspeter is offline   Reply With Quote
Old 02-10-2017, 07:57 PM   #20
poczynek
Zealot
poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.
 
Posts: 114
Karma: 26552
Join Date: Jan 2017
Device: Kobo Forma
Quote:
Originally Posted by Hanspeter View Post
I do not one that model. Please do the following:
1) open Kual => Showtime, select the Showtime button
2) open a book and scroll some pages
2) open Kual => Showtime, select "Copy system log"
3) connect your Kindel to the coputer and open the x:/extensions/showtime/bin/ folder
4) attacht the both *.log filese here

HaPe
Hi Hanspeter, ok so it seems to stop working i think when it changes time and moves a minute? Here are the two log files:

Message logs attached. Thank you.
Attached Files
File Type: rar bin.rar (5.4 KB, 205 views)
poczynek is offline   Reply With Quote
Advert
Old 02-13-2017, 12:29 PM   #21
BiliBug
Connoisseur
BiliBug ought to be getting tired of karma fortunes by now.BiliBug ought to be getting tired of karma fortunes by now.BiliBug ought to be getting tired of karma fortunes by now.BiliBug ought to be getting tired of karma fortunes by now.BiliBug ought to be getting tired of karma fortunes by now.BiliBug ought to be getting tired of karma fortunes by now.BiliBug ought to be getting tired of karma fortunes by now.BiliBug ought to be getting tired of karma fortunes by now.BiliBug ought to be getting tired of karma fortunes by now.BiliBug ought to be getting tired of karma fortunes by now.BiliBug ought to be getting tired of karma fortunes by now.
 
Posts: 94
Karma: 354151
Join Date: Nov 2012
Location: Stockton, NJ
Device: Kobo Sage (Formerly KKB, PW1, PW3, KV, OA3)
Good stuff.

Would it be possible to add an option to display 12 (am/pm) instead of 24 hour/military time?
BiliBug is offline   Reply With Quote
Old 02-13-2017, 04:03 PM   #22
Hanspeter
Connoisseur
Hanspeter doesn't litterHanspeter doesn't litter
 
Posts: 77
Karma: 150
Join Date: Jul 2014
Device: Kindel PW1, Voyager
Quote:
Originally Posted by poczynek View Post
Hi Hanspeter, ok so it seems to stop working i think when it changes time and moves a minute? Here are the two log files:

Message logs attached. Thank you.
Your device was not detected. I updated the code in the new version in the first post. Hope it works now.

Be sure to quit the background process from the menu before starting a new on. If it is still not working I need your logs again.

HaPe

Last edited by Hanspeter; 02-13-2017 at 04:05 PM.
Hanspeter is offline   Reply With Quote
Old 02-13-2017, 04:04 PM   #23
Hanspeter
Connoisseur
Hanspeter doesn't litterHanspeter doesn't litter
 
Posts: 77
Karma: 150
Join Date: Jul 2014
Device: Kindel PW1, Voyager
Quote:
Originally Posted by BiliBug View Post
Good stuff.

Would it be possible to add an option to display 12 (am/pm) instead of 24 hour/military time?
Hm, not as simple as it sounds without showing the seconds.
If someone knows how to tell the "date" command to output the time in local format 12/24 without seconds please give me a hint.

HaPe
Hanspeter is offline   Reply With Quote
Old 02-13-2017, 04:11 PM   #24
knc1
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Format character: %I hour (01..12)
Hint:
man date
In either a full Linux install or in a web search engine.
knc1 is offline   Reply With Quote
Old 02-13-2017, 04:33 PM   #25
poczynek
Zealot
poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.poczynek is not intimidated by interfenestral monkeys.
 
Posts: 114
Karma: 26552
Join Date: Jan 2017
Device: Kobo Forma
Quote:
Originally Posted by Hanspeter View Post
Your device was not detected. I updated the code in the new version in the first post. Hope it works now.

Be sure to quit the background process from the menu before starting a new on. If it is still not working I need your logs again.

HaPe
Thanks so much - trying now.
poczynek is offline   Reply With Quote
Old 02-15-2017, 04:08 AM   #26
Hanspeter
Connoisseur
Hanspeter doesn't litterHanspeter doesn't litter
 
Posts: 77
Karma: 150
Join Date: Jul 2014
Device: Kindel PW1, Voyager
Quote:
Originally Posted by knc1 View Post
Format character: %I hour (01..12)
Hint:
man date
In either a full Linux install or in a web search engine.
I read the man page ans in now the formatting commands and use Linux Ubuntu since 10 years as my main system and on servers..
There is a command that give the time in local (24 or 12AM/PM) format. But only with seconds.

The command that I reused to grep the right statements and display the data is highly complex from my point of view. I was not able until now to find a solution how to strip the seconds or use different formats in depends of the local settings

Code:
		# This next part says, "Clear Log" then 
		# "Push the new log, line by line, into awk" then 
		# "If a certain line is matched by awk get awk to run eips via the shell"	
		&> /var/log/messages && 2>/dev/null tail -F /var/log/messages | exec parselog | \
		awk '/.*PageTurnAction*./ || /.*JunoExecutionManager*./  {system("eips ${POS} ${ROW} `date +%H:%M`-`gasgauge-info -s`")}'
		exit 0

HaPe
Hanspeter is offline   Reply With Quote
Old 02-15-2017, 04:38 AM   #27
knc1
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Works for me:
Code:
 ~ $ date +'%I:%M'
03:37
Which is my local time, not UTC.
knc1 is offline   Reply With Quote
Old 02-15-2017, 01:35 PM   #28
Hanspeter
Connoisseur
Hanspeter doesn't litterHanspeter doesn't litter
 
Posts: 77
Karma: 150
Join Date: Jul 2014
Device: Kindel PW1, Voyager
Quote:
Originally Posted by knc1 View Post
Works for me:
Code:
 ~ $ date +'%I:%M'
03:37
Which is my local time, not UTC.
Yep, it gives me the twelve hour time too. But what I need is a statement that gives on my Kindel (witch is set to 24Hour clock, not AM/PM) the 24 Hour time without seconds and on an other Kindle that is set to 12 AM/PM hour clock the 12 hour time including AM/PM.

From my point of view I have three possibilities:
1) I would need to find a way to tell the date statement to decide this on the fly
2) Add an If to the statement and use a different format string depending on the result
3) Add an If statement and duplicate all versions of the may statement with different format stings.

Version 3 would be the easiest, but I do not like that stile of coding to simply multiply all lines on the same call only with a small different template.

I think date +%X gives me what I need, but I would need some awk or sed command around it to remove the seconds:
Code:
~$ date +%X
19:32:13
I would expect that you would get '07:32:13 PM'

Hape
Hanspeter is offline   Reply With Quote
Old 02-15-2017, 02:35 PM   #29
Hanspeter
Connoisseur
Hanspeter doesn't litterHanspeter doesn't litter
 
Posts: 77
Karma: 150
Join Date: Jul 2014
Device: Kindel PW1, Voyager
I think I found the right command:
Code:
date +%X | sed 's@\(..\):\(..\):\(..\)@\1:\2@'
but now I have the problem to include the third part of hyphens in the big awk command. I searched the net an tried a lot of versions but where not able to solve it.

I need to replace
Code:
date +%H:%M
with
Code:
date +%X | sed 's@\(..\):\(..\):\(..\)@\1:\2@'
in this awk statment:
Code:
&> /var/log/messages && 2>/dev/null tail -f /var/log/messages | \
	        awk '/.*PageAction*./ || /.*acxmgrd*./ || /.*NextPage*./ || /.*Reader*./ {system("eips ${POS} ${ROW} \"`date +%H:%M` `gasgauge-info -s`\"")}'
Ideas welcome ...
Hanspeter is offline   Reply With Quote
Old 02-15-2017, 03:55 PM   #30
knc1
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by Hanspeter View Post
Yep, it gives me the twelve hour time too. But what I need is a statement that gives on my Kindel (witch is set to 24Hour clock, not AM/PM) the 24 Hour time without seconds and on an other Kindle that is set to 12 AM/PM hour clock the 12 hour time including AM/PM.

From my point of view I have three possibilities:
1) I would need to find a way to tell the date statement to decide this on the fly
2) Add an If to the statement and use a different format string depending on the result
3) Add an If statement and duplicate all versions of the may statement with different format stings.

Version 3 would be the easiest, but I do not like that stile of coding to simply multiply all lines on the same call only with a small different template.

I think date +%X gives me what I need, but I would need some awk or sed command around it to remove the seconds:
Code:
~$ date +%X
19:32:13
I would expect that you would get '07:32:13 PM'

Hape
The date command does not work that way, it is reading a 64 bit number of microseconds.
Its output is not effected by how the GUI is displaying the time.

I have never programmed in Awk.

You could do it easy enough in Lua - It includes a system call with output formatting similar to the date command.
But being a full programming language, your not limited to the output format.

Lua is pre-installed on all touchscreen devices.
knc1 is offline   Reply With Quote
Reply


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 03:09 PM
xmahjongg for Kindle as Kual extension Hanspeter Kindle Developer's Corner 86 12-02-2016 07:06 PM
kual extension to open a book shoelesshunter Kindle Developer's Corner 14 08-16-2016 12:30 PM
Is there a Kual Extension/add-on for cloud eduardomb Kindle Developer's Corner 19 07-08-2016 05:43 PM
PRS-T2 Current time while reading chemi Sony Reader 5 01-07-2013 02:18 PM


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


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