ShortOm

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Exec Buttons)
(Exec Buttons)
Line 69: Line 69:
 
"NoW" equals "No Wait". Use this button if you want to launch your command in background. You don't catch any result or logs on logbook because shortom doesn't wait the end of the program. If you have to launche graphical program this button is the better choice.
 
"NoW" equals "No Wait". Use this button if you want to launch your command in background. You don't catch any result or logs on logbook because shortom doesn't wait the end of the program. If you have to launche graphical program this button is the better choice.
  
Using every other buttons ShortOm launch the command and wait the end. Every message print in standard output end error will be logged in logbook.
+
Using every other button ShortOm launch the command and wait the end. Every message print in standard output end error will be logged in logbook.
  
 
==Installation==
 
==Installation==

Revision as of 14:26, 26 March 2009

Contents

Introduction

Application and shell launcher, with editable config file, and log result page.

Config File

Use "#" char to insert comment line. Text before "=" char is launcher label, text after "=" char is command to execute.

There aren't any escape character to use "#" and "=" at this moment.

Example:

# start/stop gpsd
start gpsd=/etc/init.d/gpsd start
stop gpsd=/etc/init.d/gpsd stop
# launch battery
battery=battery.py




New features since version 0.3:

  • you can edit button height an width using the properties
^BT_HEIGHT=45
^BT_WIDTH=50

In these examples the buttons should be 45 pixel height and 50 pixel width at minimum. You can use only one of them (width is not so useful) or neither but if you insert a property you have to use number value greater than zero or -1.

I'm using "^" char for properties in next releases.

  • parameters management:

Now it's possibile to execute the same command with different parameters. I have add this features to manage mainly daemons. The rules:

start gpsd=/etc/init.d/gpsd%%start??stop=stop

This line build a button with label "start gpsd" which pass the parameters start (tag %%) and another button with "stop" label wich pass parameter stop. The button nowait is valid only for the first call: "/etc/init.d/gpsd start".

start gpsd=/etc/init.d/gpsd%%start??stop=stop??rel=reload

The same as before but there is another button labelled "rel" which pass the parameter "reload".

start gpsd=/etc/init.d/gpsd start??stop=stop

This is a valid row but it produce a wrong result because the first button execute

/etc/init.d/gpsd start

and the second button produce

/etc/init.d/gpsd start stop

If the command need parameters and you want to use more buttons, you have to use the tags %% and ??.

Last example:

start gpsd=/etc/init.d/gpsd??stop=stop

The first button produce:

/etc/init.d/gpsd

and the second:

/etc/init.d/gpsd stop

Exec Buttons

"NoW" equals "No Wait". Use this button if you want to launch your command in background. You don't catch any result or logs on logbook because shortom doesn't wait the end of the program. If you have to launche graphical program this button is the better choice.

Using every other button ShortOm launch the command and wait the end. Every message print in standard output end error will be logged in logbook.

Installation

 opkg install http://projects.openmoko.org/frs/download.php/738/shortom_0.3_all.ipk

Links

Project Home

Sources

Package on opkg.org

Screenshot

Shortom editor 0.3.png Shortom logbook 0.3.png

Shortom launcher 0.3.png Shortom launcher2 0.3.png

Personal tools

Introduction

Application and shell launcher, with editable config file, and log result page.

Config File

Use "#" char to insert comment line. Text before "=" char is launcher label, text after "=" char is command to execute.

There aren't any escape character to use "#" and "=" at this moment.

Example:

# start/stop gpsd
start gpsd=/etc/init.d/gpsd start
stop gpsd=/etc/init.d/gpsd stop
# launch battery
battery=battery.py




New features since version 0.3:

  • you can edit button height an width using the properties
^BT_HEIGHT=45
^BT_WIDTH=50

In these examples the buttons should be 45 pixel height and 50 pixel width at minimum. You can use only one of them (width is not so useful) or neither but if you insert a property you have to use number value greater than zero or -1.

I'm using "^" char for properties in next releases.

  • parameters management:

Now it's possibile to execute the same command with different parameters. I have add this features to manage mainly daemons. The rules:

start gpsd=/etc/init.d/gpsd%%start??stop=stop

This line build a button with label "start gpsd" which pass the parameters start (tag %%) and another button with "stop" label wich pass parameter stop. The button nowait is valid only for the first call: "/etc/init.d/gpsd start".

start gpsd=/etc/init.d/gpsd%%start??stop=stop??rel=reload

The same as before but there is another button labelled "rel" which pass the parameter "reload".

start gpsd=/etc/init.d/gpsd start??stop=stop

This is a valid row but it produce a wrong result because the first button execute

/etc/init.d/gpsd start

and the second button produce

/etc/init.d/gpsd start stop

If the command need parameters and you want to use more buttons, you have to use the tags %% and ??.

Last example:

start gpsd=/etc/init.d/gpsd??stop=stop

The first button produce:

/etc/init.d/gpsd

and the second:

/etc/init.d/gpsd stop

Exec Buttons

"NoW" equals "No Wait". Use this button if you want to launch your command in background. You don't catch any result or logs on logbook because shortom doesn't wait the end of the program. If you have to launche graphical program this button is the better choice.

Using every other buttons ShortOm launch the command and wait the end. Every message print in standard output end error will be logged in logbook.

Installation

 opkg install http://projects.openmoko.org/frs/download.php/738/shortom_0.3_all.ipk

Links

Project Home

Sources

Package on opkg.org

Screenshot

Shortom editor 0.3.png Shortom logbook 0.3.png

Shortom launcher 0.3.png Shortom launcher2 0.3.png