MANUAL
======

This is the manual for wxpypg,a cross plattform record browser for posgresql.

Why wx ? It's programmed in wxpython, a cross plattform toolkit for python. (www.wxpython.org)
Why py ? It's programmed in python,a very cool language.(www.python.org)
Why pg ? Postgresql is IMHO one of the best open source databases. (www.postgresql.org)

Installation:
Linux:
Install the rpm and you'll find wxpypg in the office submenu (gnome)
If you don't have a way to install rpm you can run it directly from the source directory.
You the startup by typing wxpypg.py
Dependecies: Python (>2.4 ?), wxPython (2.8)

Mac:
Unpack the zip file and place wxpypg where you want (contains everything you need).
The mac application only runs under 10.5
To run it on earlier macs use the source.

Windows:
Todo

Running
Parameters:
When you have started the program you will be asked to fill in some parameters:
Name:The name you want to use for this connection,anything you like (food)
Server:The ip or dns of the server that hosts the database (192.168.1.33)
Port:The port the server listens on (standard 5432)
database name:The name the database (eg fooddb)
login:The name you will be using to log on to the database
Password:The password that you'll use
If you press connect you'll then see a window with the fields of your database and some navigation buttons.
The buttons you have are:
New:Create a new record (ctrl-n)
Sort:Sort records (ctrl-s)
Find interactive:Search while typing, do note you have to enter three letters to initiate a search. (ctrl-f)
Find:Find records in a normal way, press find, all fields go blank, enter the data you want to find and press find again.
First record:Goes to first record (ctrl-home)
Previous record:Goes to previous record (ctrl-Pagedown)
Next record:Goes to next record (ctrl-Pageup)
Last record:Goes to last record (ctrl-end)
Ommit record:Ommit this record from the selection. (ctrl-o)
Delete record:Deletes this record permanently (ctrl-d)
Print record:Print this record (ctrl-p)
Export records:Export selection to csv
Import records:Import records from csv
Note:When you import records the file you import from needs to have the exact number of fields (total - 1 (primary key)), otherwize the import will not work.

Advanced,xml layouts
When you want to edit the layout of a connection do the following:
create a file freelychoosedconnectionname_view.xml under templates (~/.wxpypg/templates)
Or freelychoosedconnectionname_print.xml for changing the printed layout
The file can the alter the way things look and respond
When testing xml files you better run wxpypg from the terminal, this way you'll more likely see the error.
Check the demo files on the site to get a better understanding.
Basicly the following items exist:
("field","label","logo","portal","line","text","rect","stat","export","back")
and these can contain:
("posx","posy","filename","span","evt_update","sql","choices_sql","colwidths","find","readonly","otext","width","height","hide","fields","add","addsql","taborder","bold","size","evt_new","center","x2","y2")
This part is very untested, meaning that if the file contains error there is very little messaging done to the user.

note:The state of wxpypg is very beta, it has not yet gone through a lot of testing.


