From: Alex R. <sh...@al...> - 2004-09-22 19:19:39
|
Frode, On 09/22/2004 12:51:38 PM, Frode Jemtland wrote: >=20 > Yes, I know. I don't think I explained myself quite clear. > What I want to do is to make a ancestor tree for every person in the data= base.=20 > One dot file for each person.... Oh, I see. > In bash psaudocode (in a dream world where RelGraph.py accepts commandlin= e=20 > arguments, like Ancestor_of(), Descendants_of(), All_related_to()...): >=20 > for i in 'select id from people' > do > /usr/share/gramps/plugins/RelGraph.py Ancestors_of($i) > $i_ancestor_grap= h.dot > done >=20 > Do this make anymore sense .... ? Yes, it does with some corrections. There's no way that RelGraph.py=20 will be able to run on its own, like in your example. This is because the report plugin (as well as other plugins) is dependent on most of the core of gramps. The plugin deals with already existing=20 database, so it has to be read first using the rest of gramps. That said, nobody prohibited us from making $ gramps -i my_gramps_database -r RelGraph -o anc,I37 > file.dot work, as well as $ gramps -i my_gramps_database -l person_id to get the list of IDs beforehand. There's an RFE to allow for the command line reports, # 987981 in sf.net RFE tracker. The main obstacle to making the reports work from=20 the command line is the options setup and its complexity. Each report takes quite a few options. It seems reasonable that options should also be specified from the command line. If they are not, then sane deafults should be used. Somebody has to go trough the reports and build a comprehensive table of options for each report and a way to unambiguoulsy pack them into the command line. My mockup examples above are nothing more than the mockup. The bottom line is that the options are different for different reports, and probably should not be assigned their own flags, Instead, I would pack them into the single flag option (e.g. -o OPTION_STR or --option=3DOPTION_STR). Adding reports that take options that only the developer knows about makes little sense, so the man page (and the manual :-) should be kept up to date with whatever options are accepted. I would love to have command line reports. If nothing else, it can be, run to update lots of things without 4-5 clicks. Would anybody volunteer to put some work into it and collect the report prefs information from all the reports we have? Ideally, I would like to have a list of options=20 (concise human readable text), with each option listing the default value, and the short description of how any value should be specified on the command line. Example: Relationship Graph options Name: Filter Description: Selecting data scope Values: Entire database:ent Ancestors:anc,id=3DID -- needs person ID Descendants:des,id=3DID -- needs person ID and so on, for all options. A lot of boring mundane work, which I think can be split among the interested users :-) Requires no programming knowledge of python, so any gramps user can do it. If somebody wants to contribute, pleas don't hesitate=20 to step forward. Thanks, Alex --=20 Alexander Roitman http://ebner.neuroscience.umn.edu/people/alex.html Dept. of Neuroscience, Lions Research Building 2001 6th Street SE, Minneapolis, MN 55455 Tel (612) 625-7566 FAX (612) 626-9201 |