From: <don...@at...> - 2002-11-18 21:07:57
|
John, A lot depends on what you are trying to do. Are you looking to create you own report, or are you looking try to coerce an existing format to do what you want it to do? Most of GRAMPS reports use a report generation class (TextDoc or DrawDoc) that abstracts the file format away from the report. That allows a report to easily target PDF, HTML, RTL, OpenOffice, or other formats without changes. For graphical reports, PDF, PostScript, SVG, and OpenOffice are supported. All of these classes get their page sizes from the PaperStyles class, found in PaperStyles.py. The preset paper sizes are found in PaperMenu.py. You will see code in there that looks like: paper_sizes = [ TextDoc.PaperStyle("Letter",27.94,21.59), TextDoc.PaperStyle("Legal",35.56,21.59), TextDoc.PaperStyle("A3",42.0,29.7), TextDoc.PaperStyle("A4",29.7,21.0), TextDoc.PaperStyle("A5",21.0,14.8), TextDoc.PaperStyle("B4",35.3,25.0), TextDoc.PaperStyle("B6",17.6,12.5), TextDoc.PaperStyle("C4",32.4,22.9), TextDoc.PaperStyle("C5",22.9,16.2), TextDoc.PaperStyle("C6",16.2,11.4) ] To add a new paper size, you will just need to add a new line to this list in the format of: TextDoc.PaperStyle("Format Name", height_in_cm, width_in_cm), Gramps will then include it in the paper size menus, and most reports should understand it and adapt to it. Eventually (I've already started this, but haven't completed it), this will be taken out of the code and the sizes will be stored in an XML file, allowing you to easily add your own definitions. Dot (which is part of the graphviz project from AT&T Bell Labs) is only used for the relationship graph. Dot is a very sophisticated layout engine that can handle extremely complex relationships. GRAMPS handles most structured formats on its own. My ultimate goal is to provide a set of Layout Engines that could transform data into a nice layout. GraphLayout.py is the start of this, but only one format exists of this type now (DescendLine). If you would like to help out with writing addition graphical formats, your help would be greatly appreciated. If you have any specific questions that I can answer, just contact me at dal...@us.... I hope I've at least started to answer your questions. P.S. You don't want pdflib, but ReportLab (http://sf.net/projects/reportlab) -- Don Allingham dal...@us... > > Hi Don and others, > > I've been starting to use Gramps (0.8.0-pl2, I'm not upto RH 8.0 > yet) and I want to generate some ancester/descendant charts. I've > gotten and installed dot (though I forget what the package it is in is > called) and I've downloaded but not installed pdflib. I'll also try > out 0.8.0-pl4 tonight if I get a chance. > > The problem I have with dot is two fold: > > 1. I can't specify sizes greater than C, though I have access to D and > E size color plotters, which is really nice for big charts. > > 2. The output of dot isn't ideal. I'm really looking for something > like the very structured, and dot doesn't do that type of graphs. > > So, does anyone have any suggestions on what I can do here? I'm a > reasonable programmer, though totally clueless in python. I'd be > willing to work on hacking up some code to output nice graphs, and > certainly test them out. > > I'll take a closer look at the code and see what I can do to put > together a patch for larger plotters as well. > > Thanks, > John > john"at"stoffel.org > > > ------------------------------------------------------- > This sf.net email is sponsored by: To learn the basics of securing > your web site with SSL, click here to get a FREE TRIAL of a Thawte > Server Certificate: http://www.gothawte.com/rd524.html > _______________________________________________ > Gramps-users mailing list > Gra...@li... > https://lists.sourceforge.net/lists/listinfo/gramps-users |
From: John S. <st...@lu...> - 2002-11-18 21:47:28
|
donaldallingham> A lot depends on what you are trying to do. Are you donaldallingham> looking to create you own report, or are you looking donaldallingham> try to coerce an existing format to do what you want donaldallingham> it to do? I'm not sure. I was pretty unhappy with the output of graphziz (thanks for refreshing my memory) and how it looked. I want to get a nicer output with stright lines, each generation lined up in one row, etc. Yeah, I'm anal. :] donaldallingham> Most of GRAMPS reports use a report generation class donaldallingham> (TextDoc or DrawDoc) that abstracts the file format donaldallingham> away from the report. That allows a report to easily donaldallingham> target PDF, HTML, RTL, OpenOffice, or other formats donaldallingham> without changes. For graphical reports, PDF, donaldallingham> PostScript, SVG, and OpenOffice are supported. Makes alot of sense, you just need to have translators to go from the Gramps report format, to something that the output engine can understand. donaldallingham> All of these classes get their page sizes from the donaldallingham> PaperStyles class, found in PaperStyles.py. The donaldallingham> preset paper sizes are found in PaperMenu.py. You donaldallingham> will see code in there that looks like: donaldallingham> paper_sizes = [ donaldallingham> TextDoc.PaperStyle("Letter",27.94,21.59), donaldallingham> TextDoc.PaperStyle("Legal",35.56,21.59), donaldallingham> TextDoc.PaperStyle("A3",42.0,29.7), donaldallingham> TextDoc.PaperStyle("A4",29.7,21.0), donaldallingham> TextDoc.PaperStyle("A5",21.0,14.8), donaldallingham> TextDoc.PaperStyle("B4",35.3,25.0), donaldallingham> TextDoc.PaperStyle("B6",17.6,12.5), donaldallingham> TextDoc.PaperStyle("C4",32.4,22.9), donaldallingham> TextDoc.PaperStyle("C5",22.9,16.2), donaldallingham> TextDoc.PaperStyle("C6",16.2,11.4) donaldallingham> ] Great, I'll work up a patch for other paper sizes and send it on in then. donaldallingham> Gramps will then include it in the paper size menus, donaldallingham> and most reports should understand it and adapt to donaldallingham> it. Good. donaldallingham> Eventually (I've already started this, but haven't donaldallingham> completed it), this will be taken out of the code and donaldallingham> the sizes will be stored in an XML file, allowing you donaldallingham> to easily add your own definitions. Heh heh, I like this idea alot. I assume this will only be 0.9.0 and going forward from that? Is the 0.8.0 series now basically dead? donaldallingham> Dot (which is part of the graphviz project from AT&T donaldallingham> Bell Labs) is only used for the relationship donaldallingham> graph. Dot is a very sophisticated layout engine that donaldallingham> can handle extremely complex relationships. GRAMPS donaldallingham> handles most structured formats on its own. Hmmm... maybe what would be helpful is some example graphical reports on the web site, so people can see what's there, and comment on them to see where they should be. My interest is to take my oldest ancestor, and dump a complete descendant chart to as big a piece of paper as I can, so I can hang it on the wall to impress family, and to get updates in more easily. donaldallingham> My ultimate goal is to provide a set of Layout donaldallingham> Engines that could transform data into a nice donaldallingham> layout. GraphLayout.py is the start of this, but only donaldallingham> one format exists of this type now (DescendLine). This might be what I want to look at then. Again,this is 0.9.0 material? donaldallingham> If you would like to help out with writing addition donaldallingham> graphical formats, your help would be greatly donaldallingham> appreciated. If you have any specific questions that donaldallingham> I can answer, just contact me at donaldallingham> dal...@us.... donaldallingham> I hope I've at least started to answer your questions. This is a *great* start to my questions, I really appreciate all the work you've put into this code, as well as taking my comments on the overall GUI layout. It's really time I start learning Python, if only so I can contribute more than just comments. donaldallingham> P.S. You don't want pdflib, but ReportLab donaldallingham> (http://sf.net/projects/reportlab) Doh, yeah I had another brain fart while writing my initial stuff. The problem with being at work and the stuff is at home. |
From: Don A. <dal...@us...> - 2002-11-19 00:48:07
|
On Mon, 2002-11-18 at 14:47, John Stoffel wrote: > > donaldallingham> Eventually (I've already started this, but haven't > donaldallingham> completed it), this will be taken out of the code and > donaldallingham> the sizes will be stored in an XML file, allowing you > donaldallingham> to easily add your own definitions. > > Heh heh, I like this idea alot. I assume this will only be 0.9.0 and > going forward from that? Is the 0.8.0 series now basically dead? The 0.8.0 release isn't dead. I'm doing bug fixes, but I haven't been integrating new features. > donaldallingham> Dot (which is part of the graphviz project from AT&T > donaldallingham> Bell Labs) is only used for the relationship > donaldallingham> graph. Dot is a very sophisticated layout engine that > donaldallingham> can handle extremely complex relationships. GRAMPS > donaldallingham> handles most structured formats on its own. > > Hmmm... maybe what would be helpful is some example graphical reports > on the web site, so people can see what's there, and comment on them > to see where they should be. > > My interest is to take my oldest ancestor, and dump a complete > descendant chart to as big a piece of paper as I can, so I can hang it > on the wall to impress family, and to get updates in more easily. Have you tried the Descendant Graph? It produces a structured layout, and will tile if it cannot fit everything on a single page. > donaldallingham> My ultimate goal is to provide a set of Layout > donaldallingham> Engines that could transform data into a nice > donaldallingham> layout. GraphLayout.py is the start of this, but only > donaldallingham> one format exists of this type now (DescendLine). > > This might be what I want to look at then. Again,this is 0.9.0 > material? No, this is in both 0.8.0 and 0.9.0 Don -- Don Allingham dal...@us... http://gramps.sourceforge.net |
From: Jochen T. <jo...@re...> - 2002-11-19 09:32:45
|
On Mon, Nov 18, 2002 at 04:47:21PM -0500, John Stoffel wrote: > I'm not sure. I was pretty unhappy with the output of graphziz > (thanks for refreshing my memory) and how it looked. I want to get a > nicer output with stright lines, each generation lined up in one row, > etc. Yeah, I'm anal. :] I had the same problems with graphviz. Didn't get it to do anything remotely like what I wanted. Automatic graph layout is hard and, I guess, whatever program we could come up with to do it for us, we would always find fault with the result. So in the end I gave up on this and decided to do it manually. I wrote a Perl/Tk application which reads the gramps XML file and then shows boxes for all the people (connected by lines for the child-parent connections). There is no layout except that everybody in the same generation is in the same row. I can then drag and drop people into the places I want them at. This is some hours of work but you only have to do it once. I guess most people will have just one big family tree in Gramps and only occasionally add a few people here or there. In that case you just have to add those people at the right places. They will probably not force you to change the whole layout. You can mark whole subtrees (a person and every descendend or so) and move them in one go, so it is actually not that difficult to do the layout. The result is basically a list of persons with x and y coordinates which can be used by some other program to do really nice layouts with colors, different shapes for the boxes or whatever. The whole thing was done a year ago or so and abandonned because of time constraints. There is documentation, just a bunch of scripts. But if anybody wants to run with it, I can send the stuff to him. Jochen -- Jochen Topf jo...@re... http://www.remote.org/jochen/ +49-721-388298 |
From: John S. <st...@lu...> - 2002-11-20 14:28:16
|
Jochen> I had the same problems with graphviz. Didn't get it to do Jochen> anything remotely like what I wanted. Automatic graph layout Jochen> is hard and, I guess, whatever program we could come up with Jochen> to do it for us, we would always find fault with the Jochen> result. So in the end I gave up on this and decided to do it Jochen> manually. I wrote a Perl/Tk application which reads the Jochen> gramps XML file and then shows boxes for all the people Jochen> (connected by lines for the child-parent connections). There Jochen> is no layout except that everybody in the same generation is Jochen> in the same row. I can then drag and drop people into the Jochen> places I want them at. This sounds like what people want in alot of ways. And if you just expanded the app to sort each row, with the contraints of siblings next to each other, and below parents, then it should do just fine. Jochen> This is some hours of work but you only have to do it once. I Jochen> guess most people will have just one big family tree in Gramps Jochen> and only occasionally add a few people here or there. In that Jochen> case you just have to add those people at the right Jochen> places. They will probably not force you to change the whole Jochen> layout. You can mark whole subtrees (a person and every Jochen> descendend or so) and move them in one go, so it is actually Jochen> not that difficult to do the layout. Jochen> The result is basically a list of persons with x and y Jochen> coordinates which can be used by some other program to do Jochen> really nice layouts with colors, different shapes for the Jochen> boxes or whatever. Jochen> The whole thing was done a year ago or so and abandonned Jochen> because of time constraints. There is documentation, just a Jochen> bunch of scripts. But if anybody wants to run with it, I can Jochen> send the stuff to him. Why don't you post it to the list so others can look at what you've done and possibly take it and run with it? I'm comfortable hacking perl/tk code, so this is something I'd be interested in. John |
From: Jochen T. <jo...@re...> - 2002-11-20 16:59:21
Attachments:
gentk.pl
|
On Wed, Nov 20, 2002 at 09:28:03AM -0500, John Stoffel wrote: > Why don't you post it to the list so others can look at what you've > done and possibly take it and run with it? I'm comfortable hacking > perl/tk code, so this is something I'd be interested in. OK. Here it comes. The main application is gentk.pl. You also need the data.gramps file in the same directory and a file "ypos" which can initially be empty. Just create it with "touch ypos". You need to install XML::SAX, Perl-Tk and PDFLib. Just start gentk.pl and play around. See source code for a list of keyboard commands (search for "bind"). Note that this is alpha quality software, it might crash, destroy your data, kill your cat and eat your kids. You have been warned. Jochen -- Jochen Topf jo...@re... http://www.remote.org/jochen/ +49-721-388298 |
From: Jeffrey C. O. <je...@oa...> - 2002-11-19 04:46:46
|
On Mon, 2002-11-18 at 15:47, John Stoffel wrote: > donaldallingham> Eventually (I've already started this, but haven't > donaldallingham> completed it), this will be taken out of the code and > donaldallingham> the sizes will be stored in an XML file, allowing you > donaldallingham> to easily add your own definitions. > > Heh heh, I like this idea alot. I assume this will only be 0.9.0 and > going forward from that? Is the 0.8.0 series now basically dead? Once upon a time, I had a patch that added more paper sizes, but I found that having a huge list of paper sizes that I'd probably never use was unwieldy. I also thought about storing them in an XML file, but never got around to coding that up. What would be nice would be to have a preference screen that lets you select which paper sizes will be shown in the various report generation menus, along with the ability to define your own sizes. Jeff |
From: Don A. <don...@at...> - 2002-11-19 05:28:23
|
I just checked changes into the gramps2 branch of CVS that handles the XML file format. I haven't backed these changes into the 0.8.0 line. If someone would like to, look at the PaperMenu.py file from the gramps2 line. Don On Mon, 2002-11-18 at 21:46, Jeffrey C. Ollie wrote: > On Mon, 2002-11-18 at 15:47, John Stoffel wrote: > > donaldallingham> Eventually (I've already started this, but haven't > > donaldallingham> completed it), this will be taken out of the code and > > donaldallingham> the sizes will be stored in an XML file, allowing you > > donaldallingham> to easily add your own definitions. > > > > Heh heh, I like this idea alot. I assume this will only be 0.9.0 and > > going forward from that? Is the 0.8.0 series now basically dead? > > Once upon a time, I had a patch that added more paper sizes, but I found > that having a huge list of paper sizes that I'd probably never use was > unwieldy. I also thought about storing them in an XML file, but never > got around to coding that up. What would be nice would be to have a > preference screen that lets you select which paper sizes will be shown > in the various report generation menus, along with the ability to define > your own sizes. > > Jeff > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: To learn the basics of securing > your web site with SSL, click here to get a FREE TRIAL of a Thawte > Server Certificate: http://www.gothawte.com/rd524.html > _______________________________________________ > Gramps-users mailing list > Gra...@li... > https://lists.sourceforge.net/lists/listinfo/gramps-users > |