1. Gramps-tk
This project is currently inactive. Please join the GRAMPS development team at http://gramps-project.org For additional information about this project, please see http://emergent.brynmawr.edu/pipermail/gramps-tk/2008-February/000110.html
Simplified Python Genealogy Project
This page is a place to discuss and plan for a new genalogy project based on Gramps, Genealogical Research and Analysis Management Programming System. First, a big "thank you" to Alex Roitman and Don Allingham and the rest of the gang at Gramps. Without their hardwork, their kindness, and the GPL, this project would not be possible. You can find out more about Gramps at http://gramps.sourceforge.net/
Gramps-tk was created in an attempt to make most of the functionality that is available in Gramps to a wider group of users and developers. Gramps is written in Python and uses gtk and gnome extensively. It looks lovely, but gtk and gnome require many resources. Gramps-tk will be designed to allow multiple interfaces to a core codebase. In addition, this project hopes to simplify the codebase to use Pythonic idioms where possible.
(A side benefit is that Gramps-tk will be useful for teaching. For example, computer science students could learn tree-based algorithms by manipulating their own family tree data.)
If you are interested in helping in any capacity, please join the mailing list (below).
A picture of the gramps-tk screen after the first day of development.
Contents
- Gramps-tk
- Mailing List
- Planning
- Getting started
- Step 1: Python
- Step 2: Tkinter and Tix
- Step 3: gramps-tk
- Step 4: GRAMPS2
- Step 5: Install and Run
- Step 6: Demo
- Ask not what gramps-tk can do for you, but what can you do for gramps-tk?
- Links and Resources
2. Mailing List
There is currently a mailing list to discuss these ideas, gramps-tk@emergent.brynmawr.edu. Visit http://emergent.brynmawr.edu/mailman/listinfo/gramps-tk to join (mailing list manager written in Python!) .
Archives can be found at http://emergent.brynmawr.edu/pipermail/gramps-tk/
3. Planning
The details of what is done, and what is left to do can be found on the GrampsTkStatus page. Please feel free to put notes, comments or questions there.
4. Getting started
The following are step-by-step instructions for getting Gramps-tk up and running, starting from square one, assuming you know very little. These instructions assume that you are running Linux, or Linux. Mac OS X should work similarly (you can probably use Fink to get many of these items), and Windows is probably not that different.
4.1. Step 1: Python
First, you will need to have a modern Python version (version 2.3 or higher). How can you tell if you have it or not? Run:
$ python -V
If you don't have it, you can get it from many places, including http://python.org/
4.2. Step 2: Tkinter and Tix
Next, you will need Tkinter and Tix (graphics toolkits for Python). How can you tell if you have it or not? Run:
$ python >>> import Tix >>> root = Tix.Tk()
If that works, then you should be all set. You can exit from Python by pressing <CONTROL>+d. Debian users may have to:
$ apt-get install tix
4.3. Step 3: gramps-tk
Now, you should get the latest gramps-tk tgz file from here: http://bubo.brynmawr.edu/~dblank/gramps-tk/download/ or simply run:
$ wget http://bubo.brynmawr.edu/~dblank/gramps-tk/download/gramps-tk-current.tgz
You can untar it into your home directory with (on Linux/Unix):
$ tar xfzv gramp-tk-current.tgz
That should list out some files, and make the directory ./gramps-tk in your current directory.
4.4. Step 4: GRAMPS2
Now you need GRAMPS2 from CVS if you don't already have it. You can easily get it after installing gramps-tk with:
$ cd gramps-tk $ make gramps2
Press <ENTER> when it asks for a password. That will checkout a version of gramps2 next to gramps-tk. That make command is short for:
$ cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/gramps login $ cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/gramps co gramps2
but you don't have to do that; make will do it for you.
4.5. Step 5: Install and Run
Now, run:
$ make install $ make run
This will a) copy all of the files over to the ./gramps2/src directory, and b) run the code from over there. You only need to do a "make install" after an update or re-download. Afterwards, you can just type "make run".
4.6. Step 6: Demo
You will need to import a .GED file to do anything other than look at the pretty interface: select "Import..." from the "File" menu and select a *.GED file. You can then begin to see your family tree data. Things that work:
-
people view; double-click a surname or person.
-
family view; double-click a name to change it to the active person
-
see a graphical tree on the Pedigree page
-
see empty tables on the other pages
-
import a different GED file
-
that's about it!
If it crashes you may have to press Control+C in the terminal window.
5. Ask not what gramps-tk can do for you, but what can you do for gramps-tk?
-
For users, try out these instructions and give feedback to the mailing list. The code should work on Mac/Win, but these instructions don't tell you how to get it started. Maybe you can figure it out?
-
For developers, become familiar with Tkinter, Tix, and gramps-tk source code. The GUI code is in two main files: gramps_tk.py and GrampsGuiTk. All of the other code is in *Tk.py (if it is a "fork" of the regular *.py file) or in the regular gramps files (in gramps2/src/*.py).
Developer notes:
You can run make debug which is like make run except that you will have the Python prompt in the console window. From there you can interact with the GUI and other objects. For example:
$ make debug [gramps-tk window should open up, and you can type below] >>> gramps.pages["People"] <Tix.TixSubWidget instance at 0xf6ab08cc> >>> <CONTROL>+d
gramps is the main application object. Occasionally, you may have to type "reset" at the console if Python doesn't reset your terminal correctly. Usually, if you enter something at the Python prompt, it should restore it.
You could work on:
-
any of the other windows or dialogs
-
the main edit window for a person
-
any of the toolbar or menu functions
-
pedigree view
-
reports and tools
-
a different GUI toolkit (ncurses, QT, Pmw, wxPython, gtk, etc.)
Patches can be made by saving the original file and comparing it with your modified version, like so:
$ diff -u ../gramps-tk.orig/gramps_tk.py gramps_tk.py > gramps_tk.patch
The source code will be available via CVS someday. Details on using CVS can be found at PyroDeveloperCVS (just replace "pyro" with "gramps-tk" on that page). For now, though, just send patches to the mailing list. The source code can be browsed
here.
6. Links and Resources
Python-based GPL projects and other resources that may be useful:
