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 01-19-2019, 12:31 PM   #1
j.p.s
Wizard
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 2,065
Karma: 32926732
Join Date: Apr 2011
Device: pb360
KUAL "listing bump" proof of concept

The list view listing for the KUAL booklet drifts down the screen and eventually off the first page as other books are opened even if KUAL has been used in the meantime. That is, the access time for the booklet KUAL does not get updated, unlike the kindlet KUAL.

The good news is that updating p_lastAccess for the KUAL record in cc.db raises KUAL to the second entry of the list view listing with the Recent filter after another book is opened and closed. The bad news is that the sqlite3 on board the kindle can not update cc.db (See post #1862 in https://www.mobileread.com/forums/sh...03326&page=125 )

Proof that there is hope:
Code:
mkdir local
sshfs root@oasis:/var/local local
NOW=`ssh root@oasis date '+%s'`
sqlite3.26 local/cc.db "SELECT icu_load_collation('en_US.utf8', 'icu');  update Entries set p_lastAccess = $NOW where p_titles_0_nominal = 'KUAL';"
fusermount -u local
Open a book on the kindle, then close it. KUAL will be the second entry in list view.

So, with a kindle sqlite3 binary that speaks icu, it would be straightforward to make a KUAL extention that bumps KUAL's listing.

This has been implemented as a KUAL extension. See https://www.mobileread.com/forums/sh...63#post3803463

Last edited by j.p.s; 01-27-2019 at 12:16 PM. Reason: Add URL to point to KUAL extension.
j.p.s is offline   Reply With Quote
Old 01-19-2019, 12:45 PM   #2
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,760
Karma: 17900000
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by j.p.s View Post
The list view listing for the KUAL booklet drifts down the screen and eventually off the first page as other books are opened even if KUAL has been used in the meantime. That is, the access time for the booklet KUAL does not get updated, unlike the kindlet KUAL.

The good news is that updating p_lastAccess for the KUAL record in cc.db raises KUAL to the second entry of the list view listing with the Recent filter after another book is opened and closed. The bad news is that the sqlite3 on board the kindle can not update cc.db (See post #1862 in https://www.mobileread.com/forums/sh...03326&page=125 )

Proof that there is hope:
Code:
mkdir local
sshfs root@oasis:/var/local local
NOW=`ssh root@oasis date '+%s'`
sqlite3.26 local/cc.db "SELECT icu_load_collation('en_US.utf8', 'icu');  update Entries set p_lastAccess = $NOW where p_titles_0_nominal = 'KUAL';"
fusermount -u local
Open a book on the kindle, then close it. KUAL will be the second entry in list view.

So, with a kindle sqlite3 binary that speaks icu, it would be straightforward to make a KUAL extention that bumps KUAL's listing.
Try the one NiLuJe packages with SS(??) - one of his catch-all packages.
If not, then I have a build linked to the entire Uncode data library - as in: everything.
If NiLuJe's does not do the trick, post in this thread and I will attach my build.


PS: There is another db there, with one entry, which holds the collation value setting to execute in sqlite3 to modify and delete of cc.db. (maybe: locale.db ??)

Last edited by knc1; 01-19-2019 at 12:47 PM.
knc1 is offline   Reply With Quote
Old 01-19-2019, 01:25 PM   #3
j.p.s
Wizard
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 2,065
Karma: 32926732
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by knc1 View Post
Try the one NiLuJe packages with SS(??) - one of his catch-all packages.
If not, then I have a build linked to the entire Uncode data library - as in: everything.
If NiLuJe's does not do the trick, post in this thread and I will attach my build.
Thanks.

I dumped the SS tar.xz but didn't think to dump the update.bin

I'll have to grab kindletool and have a look.

Quote:
Originally Posted by knc1 View Post
PS: There is another db there, with one entry, which holds the collation value setting to execute in sqlite3 to modify and delete of cc.db. (maybe: locale.db ??)
Can't find anything like that.

I guess there will need to be two versions. One for those (including me) who don't like case insensitive order anyway and another for those that don't mind using space on another copy of sqlite3. (I prefer not to make it dependent on SS, but I guess that those with SS can have the best of both.)
j.p.s is offline   Reply With Quote
Old 01-19-2019, 01:44 PM   #4
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,760
Karma: 17900000
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by j.p.s View Post
Thanks.

I dumped the SS tar.xz but didn't think to dump the update.bin

I'll have to grab kindletool and have a look.



Can't find anything like that.

I guess there will need to be two versions. One for those (including me) who don't like case insensitive order anyway and another for those that don't mind using space on another copy of sqlite3. (I prefer not to make it dependent on SS, but I guess that those with SS can have the best of both.)
I do not know how "space" fits into this.
The content collections data base is set to the collation determined by the language question's answer when powering up the Kindle for the first time.


Your choice of English UTF8 just happens to be what yours is set for.
Other countries, probably not.
But I think the various UTF8 'space' types appear in the same position in all collation orders.
knc1 is offline   Reply With Quote
Old 01-19-2019, 02:10 PM   #5
PoP
 curly᷂͓̫̙᷊̥̮̾ͯͤͭͬͦͨ ʎʌɹnɔ
PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.PoP ought to be getting tired of karma fortunes by now.
 
PoP's Avatar
 
Posts: 2,424
Karma: 38715583
Join Date: Dec 2010
Location: ♁ ᴺ₄₅°₃₀' ᵂ₇₃°₃₇' ±₆₀"
Device: K3₃.₄.₂ PW3₅.₁₀.₃
My (very simple) trick to access KUAL without scrolling.

Since the KUAL Doc does indeed drift down, I placed it in a collection "Jeux & Applications" with very few items showing on a single page. I also choose the collection name to sort hi on page one of my Kindle list view.

Two taps and I can launch KUAL.

Click image for larger version

Name:	screenshot_2019_01_19T13_46_12-0500.png
Views:	59
Size:	28.4 KB
ID:	169178
PoP is offline   Reply With Quote
Old 01-19-2019, 02:26 PM   #6
j.p.s
Wizard
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 2,065
Karma: 32926732
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by knc1 View Post
I do not know how "space" fits into this.
Sorry. I meant the storage space required for yet another sqlite3 binary.

BTW, I'm not having any luck finding an sqlite binary in the SS package.
j.p.s is offline   Reply With Quote
Old 01-19-2019, 02:31 PM   #7
j.p.s
Wizard
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 2,065
Karma: 32926732
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by PoP View Post
My (very simple) trick to access KUAL without scrolling.

Since the KUAL Doc does indeed drift down, I placed it in a collection "Jeux & Applications" with very few items showing on a single page. I also choose the collection name to sort hi on page one of my Kindle list view.

Two taps and I can launch KUAL.
Thanks.

That sounds like the way to go for anyone using collections. I gave up trying to use collection years ago in frustration.
j.p.s is offline   Reply With Quote
Old 01-19-2019, 04:28 PM   #8
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: 8,511
Karma: 11599999
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O & Forma
@j.p.s: It's in the Python package (which is a recommended dependency of the SS package ).

FWIW, that's also how I used to handle Kindlets back in the day: put 'em in a dedicated collection .
NiLuJe is offline   Reply With Quote
Old 01-19-2019, 05:12 PM   #9
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 3,889
Karma: 9100039
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, iPad 9.7, iPad 12.9
Quote:
Originally Posted by PoP View Post
My (very simple) trick to access KUAL without scrolling.

Since the KUAL Doc does indeed drift down, I placed it in a collection "Jeux & Applications" with very few items showing on a single page. I also choose the collection name to sort hi on page one of my Kindle list view.

Two taps and I can launch KUAL.
Lol, I just use search. "kual" is pretty much permanently on my recent search history (either as first or second item). Takes more taps but I've got too many collections and change sort/filter often so search is most efficient for me.
ilovejedd is offline   Reply With Quote
Old 01-19-2019, 07:23 PM   #10
j.p.s
Wizard
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 2,065
Karma: 32926732
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by NiLuJe View Post
@j.p.s: It's in the Python package (which is a recommended dependency of the SS package ).

FWIW, that's also how I used to handle Kindlets back in the day: put 'em in a dedicated collection .
The sqlite3 in the python package worked great.

I'll probably put together a KUAL package next weekend.

I'm open to suggestions for name, including capitalization. If I don't hear anything better, I'll probably use bump-kual

If that violates some naming convention, please let me know.
j.p.s is offline   Reply With Quote
Old 01-20-2019, 12:00 AM   #11
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: 8,511
Karma: 11599999
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O & Forma
I like Title Case for stuff like that, but that's just me .
NiLuJe is offline   Reply With Quote
Old 01-21-2019, 10:39 AM   #12
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,760
Karma: 17900000
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Why not use a stored procedure to update last used time of KUAL, triggered on open, close, or 'home' button press?


Hint: dump the schema of the various tables to see how stored procedures are being used now (expect firmware version variations but we don't really need to support anything older than 5.2).
knc1 is offline   Reply With Quote
Old 01-21-2019, 04:41 PM   #13
j.p.s
Wizard
j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.j.p.s ought to be getting tired of karma fortunes by now.
 
Posts: 2,065
Karma: 32926732
Join Date: Apr 2011
Device: pb360
Quote:
Originally Posted by knc1 View Post
Why not use a stored procedure to update last used time of KUAL, triggered on open, close, or 'home' button press?


Hint: dump the schema of the various tables to see how stored procedures are being used now (expect firmware version variations but we don't really need to support anything older than 5.2).
Thanks, that's a good suggestion and I will consider giving it a try.

Shouldn't exiting KUAL generate a close event and shouldn't that already trigger an access time update? Is this a kindlet vs booklet thing, an amazon bug, or a missing piece in KUAL?
j.p.s is offline   Reply With Quote
Old 01-21-2019, 05:45 PM   #14
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,760
Karma: 17900000
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by j.p.s View Post
Thanks, that's a good suggestion and I will consider giving it a try.

Shouldn't exiting KUAL generate a close event and shouldn't that already trigger an access time update? Is this a kindlet vs booklet thing, an amazon bug, or a missing piece in KUAL?
Perhaps I mis-understood what you wanted to achive.
Closing KUAL **should** make it the most recently used already.

I thought you wanted to prevent the opening/closing of anything else from moving KUAL from "most recent" position.

So where ever the system records how recent something is used, the stored procedure should modify that field for KUAL, for anything opened/closed OTHER THAN KUAL.
(Don't want to loop when changing KUAL use time (whatever it is named) by letting it trigger the procedure again.)

I admit, I am not looking at a Kindle db at the moment and not even I trust my memory (which is why I no longer answer questions).
In fact, I am going through my stack of Kindles, looking for the one with the sql stuff on it.
It is here, somewhere. ....
knc1 is offline   Reply With Quote
Old 01-21-2019, 05:58 PM   #15
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 3,889
Karma: 9100039
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, iPad 9.7, iPad 12.9
Quote:
Originally Posted by knc1 View Post
Perhaps I mis-understood what you wanted to achive.
Closing KUAL **should** make it the most recently used already.
That works with KUAL Kindlet (azw2) but not with KUAL Booklet.
ilovejedd 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
Recovering KUAL after 5.9.5.1 upgrade? ";log mrpi" has no effect gwynevans Kindle Developer's Corner 7 06-03-2018 06:45 AM
The concept of the "finished" text teh603 Writers' Corner 6 05-11-2012 07:20 AM
"Burden of Proof" thriller only $1.99 yellowstonegirl Deals and Resources (No Self-Promotion or Affiliate Links) 1 01-31-2010 01:07 PM
Most "future proof" format? Shiren Sony Reader 21 12-12-2008 02:31 PM
"Concept Readius": rollable electronic paper ready for prime time Colin Dunstan News 5 02-05-2006 01:52 AM


All times are GMT -4. The time now is 11:04 PM.


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