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-12-2013, 10:52 AM   #1
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
Sew on a new menu of buttons.

Everyone is a noob at some point in this game, so look at a 'worked example' first.

File layout (v.0.3.1):
Code:
*/documents
    KindleLauncher-2.0.azw2
*/extensions
    /helper
        config.xml
        menu.jason
        /bin
            411.sh
            kill-kterm.sh
            setorientation.sh
            ssallow.sh
            ssprevent.sh
            start_update.sh
            usbnetwork.sh
File contents, /extensions/helper/config.xml:
PHP Code:
<?xml version="1.0" encoding="UTF-8"?>
<extension>
    <information>
        <name>Helper</name>
        <version>0.0</version>
        <author>Ixtab Twobob</author>
        <id>helper</id>
    </information>
    <menus>
        <menu type="json" dynamic="true">menu.json</menu>
    </menus>
</extension>
File contents, /extensions/helper/menu.jason:
PHP Code:
{
    
"items": [
        {
        
"name""Helper",
        
"priority"0,
        
"items": [
            {
"name""BEGIN: Run Grayed Install""priority"1"action""bin/start_update.sh"},
            {
"name""Start/Stop UsbNetworking""priority"2"action""bin/usbnetwork.sh"},
            {
"name""PREVENT: ScreenSavers""priority"10"action""bin/ssprevent.sh"},
            {
"name""ALLOW: ScreenSaver:""priority"11"action""bin/ssallow.sh"},
            {
"name""711 Page: (Network Info)""priority"52"action""bin/411.sh""params""711"}
        ]
        }
    ]

File contents, /extensions/helper/bin/start_update.sh
PHP Code:
#!/bin/sh
lipc-set-prop com.lab126.ota startUpdate 1 
A nice, regular, file layout.
Now, see if I can duplicate that for the BBB extension.
knc1 is offline   Reply With Quote
Old 02-12-2013, 10:57 AM   #2
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
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
Laid naked.

Good place to start.
twobob is offline   Reply With Quote
Old 02-12-2013, 05:44 PM   #3
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
Helper Menu add-in example

Not a good example of shell programming, just an example of what to change from that shown in post #1 for your own button add-in to the Helper menu.

The Button Man's helper menu is in */extensions/helper
Mine are going into */extensions/helper2
Pick a directory name of your own to use.

In config.xml change **ONLY** the >author< attribute.

In the menu.json file change the 'name:' string to the button label.
In the same line, change the 'action:' string to your path and filename. Paths are relative to your extension directory name.
The 'sort priority' field is not currently used, leave it set at 1.

This demo only adds one button, but add additional button defs. as shown in the post #1 example code as required.

Write a shell script (which can be executed by Busybox Ash) for that described in the 'action:' string (put in your own bin directory).

All of the above text files **should** use Linux line endings.

Create a compressed tarball based at your helper's directory name, see attached for an example.

Enjoy.
(PS: example creates a report 'book' in documents with only the character '/' in it.) I.E: The current working directory of your scripts - which are run as the administrator 'root'.
Attached Files
File Type: gz helper2-demo.tar.gz (751 Bytes, 248 views)
knc1 is offline   Reply With Quote
Old 02-13-2013, 10:59 AM   #4
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
Pre-release Preview

Released, see:
https://www.mobileread.com/forums/sho...d.php?t=205732

Unarchive,
Diddle the ntpdate.conf file for a local NTP time server if required
(Directions in config file) -
Put the directory 'helper2' and its sub-directories under the 'extensions' folder of KUAL -
Establish a network connection -
Select the 'Set DateTime from Server' button -
It should 'just work' and produce a new 'book-report'.

Only tested on Kpw-5.3.3 but it is written to be harmless -
Give it a try and report back here -
If any errors (other than 'server not available') attach the book-report to your post.

Please mention your Kindle model when making a report.

Last edited by knc1; 02-13-2013 at 08:21 PM.
knc1 is offline   Reply With Quote
Old 02-13-2013, 12:09 PM   #5
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
Field report #1

Works fine on the Kpw (paperwhite)

Testing by twobob:
Works fine on the K5 (touch)
Works fine on the K3
Does not work over DX-3G (but should work over USB networking if you have that setup to access the Internet)

Other testing in progress.
From the list above - it should work on the K4
Still to be heard from: the K2

Other reports on other devices would be nice to have.

Last edited by knc1; 02-13-2013 at 01:10 PM.
knc1 is offline   Reply With Quote
Old 02-13-2013, 12:46 PM   #6
stepk
Groupie
stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.stepk ought to be getting tired of karma fortunes by now.
 
Posts: 165
Karma: 593460
Join Date: Oct 2012
Device: K5 B011 5.3.2.1
Nice script! Can't help you with reporting on other devices as I only have a KT. Suggestion: change the thread title to mention its connection to KUAL.
stepk is offline   Reply With Quote
Old 02-13-2013, 12:59 PM   #7
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 stepk View Post
Nice script! Can't help you with reporting on other devices as I only have a KT. Suggestion: change the thread title to mention its connection to KUAL.
Setting the date/time without contacting Amazon is a popular item -
Will give it its own thread when ready.
knc1 is offline   Reply With Quote
Old 02-13-2013, 06:35 PM   #8
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
KUAL DateTime Button Released

Released:
https://www.mobileread.com/forums/sho...d.php?t=205732
knc1 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
Free Book (Kindle) - How to Sew: Basics koland Deals and Resources (No Self-Promotion or Affiliate Links) 2 05-06-2011 10:09 AM
PRS-505 PRS-505 menu and other buttons no response. PLEASE HELP jakeluck Sony Reader 2 01-08-2011 03:23 PM
Convert "Section Menu" in "Main Menu" zeener Recipes 2 11-23-2010 10:33 AM
main menu, section menu, css for calibre mobipocket output naisren Calibre 2 08-23-2010 11:42 PM
Metadata downloads via Edit menu but not via Download menu mfyahya Calibre 10 06-20-2010 06:50 AM


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


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