Here are a few a my Tcl/Tk programs. I have recently started studying this language. I am currently using the Aqua Tcl/Tk Batteries Included distribution. There might be a few Macintosh features in some of the programs. Enjoy!
Current Contents:
parseQif is my
first Tcl program that does something useful (for me). It takes a qif file
exported from Quicken and generates a csv style file that I can use for importing
into my Postgresql database. I recommend using the program "DropScript" to wrap
parseQif in a Mac Application. This will allow you to simply drop a
file on the generated file and automagically have the conversion performed.
PgBrowse 0.7 is my
first Tk program that does something useful. It allows users to browse
PostgreSQL databases. The prerequisites are fairly stiff so unless you are a Tk
freak with a recent installation of PostgreSQL there might not be a lot of
interest...This is a preliminary release, more enhancements to come as I
learn Tcl/Tk.
PgBrowse 0.8a is
basically the same as release 0.7 however I haved bundled L Bayuk's pgin.tcl package
in the application. This package provides the functionality of libpq and pgtcl in
"pure" tcl. It is a bit slower on large selects...I have also tried to make the
application more multiplatform friendly. I no longer specify a font and I have
tried to do the right thing with modifier keys. Windows gets "control", unix gets
"meta" and Mac gets "command". I would appreciate feed back as to these changes...
PgBrowse-0.9
is a rewrite using the "paned window" widget (thus requires Tk 8.4.*). I have
also added a menu item "Table Information..." to the file menu. Selecting this
menu item will bring up a listbox containing all of the tables/views in the
users catalog. The user can then either view the table or examine the data types
of each of the columns. I also probe for Pgtcl 1.5 ( a compiled Tcl-Postgresql
interface ). If the interface is not found then the fall back is to use
pgintcl, a postgresql-tcl interface written in pure tcl. Note that no
Postgresql software needs to be present on the computer running PgBrowse.
PgBrowse-1.0
Nov 8, 2004
This release fixes a bad memory leak and adds many enhancements.
PgBrowse-1.1
released Oct 21, 2005.
It has been a while since I have worked on this program. Enhancements
include:
PgBrowse-1.2
released Oct 23, 2005. Enhancements include:
PgBrowse-1.3
released Nov 21, 2005. The major improvement is a new table editor.
The source code version of the file can be run on the command line by the commnd "wish PgBrowse.tcl".
For Linux/x86 users I also have a Starpack version pgbrowse.kit. This is a self contained version of the program, it contains it's own Tcl/Tk interpreter and support libraries (I hope). It can be downloaded here. You can start the application either by running the pgbrowse.kit file from the command line or double click the file from a graphical view of where ever the file is stored. Here is a 48x48 png Icon that you can use for an Icon for the application.
Mac OSX users can downloaded a Disk Image of a "Bundled" version of the program here. The bundled version acts like a regular Macintosh application ie it has its own icon and can be started by double clicking the icon. You can set up an environment for Finder opened applications by setting up a plist named environment.plist and storing the result in the directory .MacOSX located in your home directory.
Windows users, sigh, need to simply download the source and install the Active State Tcl/Tk system. If this is done then you can simple double click the PgBrowse.tcl file in its folder. (I have not yet figured out how to wrap a Win XT script...
OK, how does this editor thing work...
The editor can be reached by choosing File->Table Info. This will
pop up a list box that displays all of the tables and views that
the user has access to. Clicking the button labeled "Edit Table"
or double clicking the table name will bring up the edit view
of the table. This view has a grid of the table and always has a "last"
row of fields that contain a single '*' character. Beneath the
grid is two rows of navigation tools. If the selected table
name is actually a view, then the editing buttons will be
disabled.
select * from table where
When the "Use Filter" button is clicked the contents of
the resulting string is executed and the results displayed
in the grid.
Suppose we are editing a table named "bills" then if the
text field contained "category='Medical'" (no double quotes
in the actual entry) and the Use Filter
button is clicked then the sql statement:
select * from bills where category='Medical'
would be executed and the rows would be displayed.
If the text field contained "true" (no quotes) then the
sql statment:
select * from bills where true
would be executed and ALL of the rows would be displayed.
This would not be a wise thing to do if the table had
millions of rows. However, we can limit the number of
rows displayed by placing:
true limit 1000
in the text field. The resulting statement would be
select * from bills where true limit 1000
This statement would retrieve 1000 rows from the
table.
update foo set c1='b1',c2='b2',c3='b3'
where c1='a1' and c2='a2' and c3='a3'
An INSERT command looks like
insert into foo values('b1,'b2','b3')
The DELETE command would become
delete from foo where c1='b1' and c2='b2' and c3='b3'
Note that the contents of the cells are quoted by the
program. This needs a bit of tweeking to handle
the cases of the special values NULL and DEFAULT.
If the strings NULL or DEFAULT are found in the
buffer (case is important). The update and insert
commands will be tweeked. Suppose in the above
we have b3 containing NULL and b2 contains DEFAULT
and a1 contains NULL.
Then the above three commands will become
update foo set c1='b1', c2=DEFAULT, c3=NULL
where c1 is NULL and c2='a2' and c3='a3'
insert into foo values ('b1',DEFAULT,NULL)
delete from foo where c1 is NULL and c2='a2' and c3='a3'
PgBrowse-1.4(source)
released Dec 12, 2005.
Also available is a StarPack for Linux-x86 users located here.
Mac OSX users will want to try the bundled standalone application located here.
Windows users will have to download the source and run the program in the usual way.
What is new in this release?
PgBrowse-1.5(source)
released Dec 17, 2005.
Also available is a StarPack for Linux-x86 users located here.
Mac OSX users will want to try the bundled standalone application located here.
Windows users will have to download the source and run the program in the usual way.
What is new in this release?
One needs to take care in dealing with large objects. If a row is deleted and that row contains the only reference to the large object (its oid) then it can be a bit tricky to recover the large object from the pg_largeobject table. See the contributed vacuumlo application for a possible way to clean up the large object table.
PgBrowse-1.6(source)
released Dec 29, 2005.
Also available is a StarPack for Linux-x86 users located here.
Mac OSX users will want to try the bundled standalone application located here.
Windows users will have to download the source and run the program in the usual way.
What is new in this release?
PgBrowse-1.7(source)
released Jan 9, 2006.
Also available is a StarPack for Linux-x86 users located here.
Mac OSX users will want to try the bundled standalone application located here.
Windows users will have to download the source and run the program in the usual way.
What is new in this release?
PgBrowse-1.7a(source)
released Feb 2, 2006.
Also available is a StarPack for Linux-x86 users located here.
Mac OSX users will want to try the bundled standalone application located here.
Windows users will have to download the source and run the program in the usual way.
What is new in this release?
ImgViewer-0.7.1
released May 12, 2004
is a program that can be used to view all of the photos (gifs, jpgs, etc) in a
directory. After the user chooses a directory, the directory is scanned and a
set of thumbnails is created and displayed in the main window. Thumbnails are
highlighted and their name and size will appear in the "button bar" as the
mouse passes over them. Clicking on
a thumbnail will generate a full sized picture in a seperate window which can
then be scaled up or down via the "Zoom In" and "Zoom Out" buttons. (The zoom
button implementation is via Richard Suchenwirths scaling code). A recent
version of Tcl/Tk and the Img extension are needed.
There is problem for Aqua Tcl/Tk users: If am image has a height or width in excess of 4k pixels, then Wish will crash when attempting to emplace the large image onto a canvas.
ImgViewer-0.9.1
released May 25, 2004. This release revises the interface so that the thumbnails
are displayed in a single columned frame. Clicking on a thumb will display an
enlarged version of the picture in an adjacent frame. I have added a "slideshow"
button that will display each enlarged picture for 5 seconds.
Ofx2csv.
released Feb 21, 2006 is
a simple program that extracts transaction details from OFX 1.x documents that
are typically obtained by downloading account information from Banks or
Credit Cards. ( Quicken and MS Money both understand this format).
The transactions are extracted and displayed in an editable
table. After making the edit changes the user can save the file as a csv
type file which can then be imported into almost any database. My personal
financial databases require a Category field for each transaction. I
use a category field as a "foreign" key in my database. This means that
specifying a nonexistant key or a miss-spelled key will abort the importation
of the CSV file. The program eases this problem by having a list box containing
all of the foreign keys. Selecting a category field in the table and double
clicking a member of the list will cause the selected category field to be
replaced with the item that was double clicked.
Ofx2csv-0.8.
released Feb 4, 2007.
The only change in this release is the addition of a popup menu that
simplifies changing the "Category" field. The popup menu is invoked by
"Control-Button-1" in a "category field". The selected menu item will
replace the contents of the cell where the mouse click occured.
Send mail to me (Jerry LeVan)
if you have any problems/questions....
Back to my HomePage.
Counter courtesy of http://www.digits.com
Last update Feb 4, 2007