termlauncher TermLauncher Applet 0.0.2

Quickly launch gnome-terminals of a given profile.

This is a GNOME applet written in Python. It is meant as an alternative to the standard launcher applet. The difference between this and the standard launcher applet (so far) is that it has a context menu which enables you to launch a terminal using a particular profile.

Download: TermLauncherApplet-0.0.2.tar.gz

Script - idle_run.py

Have a program start up automatically when the screensaver activates, ie when the system is idle.

This is a quick python script which runs in the background waiting for gnome-screensaver to activate. When the screensaver kicks in this script will run the program of your choice, and also kill it once the screensaver is no longer active. Edit the RUNME value with the name of the program you wish to run. Place any arguments to pass in the ARGS value (this may be blank if you wish). Make sure the script runs when you log in by adding it to your session via your System -> Preferences -> Sessions dialogue. NOTE: this script only works if you are using gnome-screensaver.

Download: idle_run.py

Projects - BasiliX - Your Mail Gateway

I have recently taken over the maintainance and development of BasiliX a webmail program written in php.

BasiliX is a webmail application based on PHP and IMAP, and powered with the MySQL database server. Some of its main features are; sending/receiving e-mails with attachments, an addressbook with groups, settings utility, multiple languages, multiple folders, and theme support. It has a nice user-friendly interface and its HTML template files are easily changed.


ice2Libs v0.0.1 - Download

Introduction
OK here it is, by popular demand (well, not really but....), the initial release of ice2Libs. ice2Libs are intended to be a set of php libs which will enable the rapid creation of php web sites and applications. This first release is bundled with iceGrab and includes ice_htmlTable, a class to produce html tables (surprisingly enough). ice_htmlTable objects can be manipulated easily allowing you to change the appearance and content of tables on the fly.

Examples
The best way to show this is with a simple example. Take the code below:

$table = new ice_htmlTable();
$table -> set_cellpadding(3);
$table -> set_border(2);
$table -> set_bgColor('green');

// Individual cell properties are set up using an
// array of the form:
// array(Content/text, column, row, colspan, rowspan)
// And they may also contain any legal cell html
// attributes in the form 'attribute' => 'value'
$cells[] = array('A title cell', 1, 1, 2, 1, 'align' => 'center', 'bgcolor' => 'blue');
$cells[] = array('A content cell', 1, 2, 1, 1, 'align' => 'center');
$cells[] = array('Another cell', 2, 2, 1, 1, 'width' => '80%');

//The table can be built by feeding an array of cell
//property arrays to the set_cells method
$table -> set_cells($cells);

$table -> show();

Produces the following (ugly) table:

A title cell
A content cell Another cell

As well as ice_htmlTable, this first release also includes ice_htmlForm, a set of classes for producing forms. ice_htmlForm objects can be easily linked to a database allowing you to rapidly produce web applications. This is made even easier with ice_dbClass (to be released soon). An example follows:

// Create a table to contain our form.
$table = new ice_htmlTable();
$table -> set_border(1);
$table -> set_bgColor('white');

// Set up the form header
$formHeader = array(
'method' => 'post',
'action' => 'index.php',
);

$table -> set_formHead($formHeader);

// Most form elements take the form:
// ice_elementName(label, name, defaultValue)

// First, a few example drop down lists.
//
// A range of numbers, 0 - 100 going up in
// increments of 10
$numbers = new ice_rangeSelectList('Range', 'numbers', 0, 100, 10);

// A date select. Defaults to today.
$date = new ice_dateTimeSelectList('Date', 'date');

// An array of values for our name list:
// array('value' => 'text')
$names = array(
'1' => 'Bob',
'3' => 'Mike',
'6' => 'Jane',
'7' => 'Terry'
);

$nameList = new ice_idSelectList('Names', 'names', $names);

// Set the selected value to Mike.
$nameList -> set_selected('Mike');

// Include a blank option.
$nameList -> set_blank(1);

// A text box.
$defaultText = 'default';
$text = new ice_textEntry('Text Box', 'text', $defaultText);
$text -> set_layout(1);

// A read-only text area.
$message = "This is a message in a read only text area.";
$textArea = new ice_textArea('A message', 'message', $message);
$textArea -> set_readOnly(1);
$textArea -> set_layout(2);

// Set up the cells for the table. We get the html of
// each form element using the get_html() method
$cells[] = array('A Title', 1, 1, 2, 1, 'align' => 'center', 'bgcolor' => 'blue');
$cells[] = array($numbers -> get_html(), 1, 2, 1, 1);
$cells[] = array($nameList -> get_html(), 2, 2, 1, 1);
$cells[] = array($date -> get_html(), 1, 3, 2, 1, 'align' => 'center');
$cells[] = array($text -> get_html(), 1, 4, 2, 1, 'align' => 'center');
$cells[] = array($textArea -> get_html(), 1, 5, 2, 1, 'align' => 'center');

$table -> set_cells($cells);
$table -> show();

Produces the following:

A Title
Range  Names 
Date   
Text Box
 A message

The code generated by ice2Libs is valid XHTML 1.0 Transitional.

Download ice2Libs v0.0.1
Included in this distribution:

  • ice_htmlTable
  • ice_htmlForm
  • iceGrab - news grabber

Grab the tarball here - ice2Libs_0.0.1.tar.gz

License
ice2Libs are released under the The GNU General Public License (GPL) so they're free (as in beer and freedom). Feel free to use them on your site or in your applications. If you're wondering how to pay for this code, well, while any cheques, computer equiptment, chocolate is greatly achieved and all major credit cards are accepted, the real payment is in contribution. If you think there's something lacking or you find a bug, let me know and I'll try to put it right, alternatively if you write code that you think could benefit ice2Libs send it to me and get involved in the developement. Also, if you do use the code, a mention as to where you got it wouldn't go amiss.




Created with Vim   Graphics by GIMP