View Single Post
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, 255 views)
knc1 is offline   Reply With Quote