From: Warren P. <wpo...@gm...> - 2006-03-10 02:31:49
|
This started because I wanted to ask family members to help supply missing information for the database I've started to maintain. For example, there are several people (wives) for whom I have no last name. I could use a filter to get the records for these people (wives with no last name), but I couldn't figure out how to generate a list of names that I could include in mail requesting help - so I thought that I might be able to query the DB directly (#2 below) - something like "select all people where last_name_of_spouse = ''". I don't want to have go to each record (using gramps) to get the information I need - I want to generate the list and copy-and-paste it into the mail. Alex Roitman wrote: > Warren, > > On Thu, 2006-03-09 at 17:01 -0500, Warren Pollans wrote: >> Could someone please send me a simple script that I could use to read >> the persons db from the commandline? I don't speak python, but I am >> fluent in both perl and ruby. If someone could provide a template for >> me, I'd appreciate it. I've just started looking thru the docs on the >> developer's wiki - and hope to understand how gramps works before too >> long. I'm using gramps and I'm pretty happy with it. > > I am a little unclear as to what exactly you want to do: > 1. Have a python script to extract data as python objects > in terms of Gramps-defined classes? > 2. Have a shell script to print some data on stdout? > If so, which data? Names? Birthdates? > 3. Something else? > > Number 1 gives you all the flexibility, but you have to > then work with python classes in python. Number 2 may work > with names and IDs, but for anything else somebody > has to write python code to do that. > > Let us know what you meant, > Alex > |