ShortOm

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Screenshot)
m (link fix)
 
(7 intermediate revisions by one user not shown)
Line 16: Line 16:
 
  # launch battery
 
  # launch battery
 
  battery=battery.py
 
  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==
 
==Exec Buttons==
Line 21: 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.
  
"Run". 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==
  
   opkg install http://projects.openmoko.org/frs/download.php/738/shortom_0.3_all.ipk
+
   opkg install http://projects.openmoko.org/frs/download.php/748/shortom_0.3_all.ipk
  
 
==Links==
 
==Links==
Line 37: Line 85:
 
==Screenshot==
 
==Screenshot==
  
[[Image:Shortom_editor_0.3.png]]
+
[[Image:Shortom_editor_0.3.png]] [[Image:Shortom_logbook_0.3.png]]
 
+
[[Image:Shortom_launcher_0.3.png]]
+
 
+
[[Image:Shortom_launcher2_0.3.png]]
+
  
[[Image:Shortom_logbook_0.3.png]]
+
[[Image:Shortom_launcher_0.3.png]] [[Image:Shortom_launcher2_0.3.png]]
  
 
[[Category: Utility Applications]]
 
[[Category: Utility Applications]]

Latest revision as of 00:01, 4 May 2009

Contents

[edit] Introduction

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

[edit] 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

[edit] 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.

[edit] Installation

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

[edit] Links

Project Home

Sources

Package on opkg.org

[edit] 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

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.

"Run". 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 launcher 0.3.png

Shortom launcher2 0.3.png

Shortom logbook 0.3.png