Re: CamelBones
Re: CamelBones
- Subject: Re: CamelBones
- From: Bob Ippolito <email@hidden>
- Date: Thu, 29 Apr 2004 14:57:37 -0400
On Apr 29, 2004, at 2:19 PM, Pierre Vaudrey wrote:
Le jeudi, 29 avr 2004, ` 13:09 Europe/Paris, Sherm Pendley a icrit :
But what the heck, this is a "Cocoa" list, not an "Objective-C" list.
Maybe you'll start a trend. ;-)
I'm currently beginning to write a CamelBones application for the
capture and/or update of genealogical data from census records. Many
people are capturing these data with Excel and Perl DBI::CSV seems
adequate for importing CSV files to Cocoa TableView. Paul Johnson's
GEDCOM library seems also very useful to manipulate genealogical data.
I have written a simple test application modeled from the Data Access
example from CamelBones site.
The opening of the csv file is made in the sub new of MyDatasource
package :
Are you familiar with Python? PyObjC is quite a bit more mature than
CamelBones... and there would be less code to write because the bridge
is more transparent. I wrote a tutorial that shows how to do a simple
/etc/passwd tableview:
http://undefined.org/python/passwdviewer_cocoabindings_tutorial.txt
(ReST source)
http://undefined.org/python/passwdviewer_cocoabindings_tutorial.pdf
(pdf tutorial with screenshots)
The csv module in Python would largely be the same as my passwd example
(see the screenshot on slide 18).. you would add this near the top:
import csv
and use this list expression to build the data source instead:
return [
dict(zip(YOURFIELDS, line))
for line in csv.reader(file(YOURCSVFILE, 'U'))
]
If you check out PyObjC CVS (or possibly the latest source release, I'm
not sure if it's in there or not), there is a more advanced example
that includes searching by word or regex.
As far as gedcom goes, there seems to be a module available (by e-mail)
here:
http://cholla.wustl.edu/baker/family_tree/
or you could rip the gedcom parsing out of gramps:
http://gramps.sourceforge.net/
-bob
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.