5.1.5, Manjaro
So, it seems like there are some off-the-cuff ways of creating charts in the UI using gramplets, as well as some ways of officially generating them as reports. Similarly, there are some reports that can be generated via the CLI, but many appear to be undefined/elusive. It would make sense to me if the charts themselves were modular and could be used by Gramps to generate images for both the CLI and the UI because they’re plotting pixels. However, I’m worried that they are not.
For example, by omitting the name of the report (or using an invalid one) from the command-line, you will get a list of supported reports (this is the default/builtin list in Arch, as I haven’t installed any additional plugins):
Using options string: name=
Report name not given. Please use one of [-p|--options] name=reportname
Available names are:
ancestor_chart - Ancestor Tree
ancestor_report - Ahnentafel Report
birthday_report - Birthday and Anniversary Report
calendar - Calendar
descend_chart - Descendant Tree
descend_report - Descendant Report
det_ancestor_report - Detailed Ancestral Report
det_descendant_report - Detailed Descendant Report
endofline_report - End of Line Report
family_descend_chart - Family Descendant Tree
family_group - Family Group Report
familylines_graph - Family Lines Graph
fan_chart - Fan Chart
hourglass_graph - Hourglass Graph
indiv_complete - Complete Individual Report
kinship_report - Kinship Report
navwebpage - Narrated Web Site
notelinkreport - Note Link Report
number_of_ancestors - Number of Ancestors Report
place_report - Place Report
records - Records Report
rel_graph - Relationship Graph
statistics_chart - Statistics Charts
summary - Database Summary Report
tag_report - Tag Report
timeline - Timeline Chart
WebCal - Web Calendar
Cleaning up.
I’m specifically interested in 2-way fan charts. I think they’re beautiful and I’d like to automate them. However, 2-way fan charts are not in this list.
It looks like all of the calls to newplugin()
in these two modules satisfies 28 of the 29 reports on that list:
gramps/plugins/drawreport/drawplugins.gpr.py
gramps/plugins/textreport/textplugins.gpr.py
(I can’t provide the links due to limitations on new users.)
However, it doesn’t seem like just any chart can be invoked from the CLI, correct?
I thought I might just try to load the plugin and then list the available reports, but that didn’t yield any different results:
gramps -i kander.ged -a report -p name= --load-modules=fanchart2way
I also tried the above with the “gramplet” plugin.
I realize that gramplets, which are sort-of subplugins (modules underneath the “gramplet” plugin) may not follow the same rules. Are we able to access gramplets from the CLI? I did a quick search, and it seems as if they can not. Please confirm.
I have the same issue with producing the narrated websites from the CLI.
I was unsuccessful trying to find anything about generating charts/reports from the CLI that wasn’t just the same basic knowledge repeated a bunch of times.
Would it be possible to write a plugin that gets one of these graphical charts to render and then step-in to capture/dump the canvas? There are three modules that relate to 2WFCs:
gramps/plugins/view/fanchart2wayview.py
gramps/gui/widgets/fanchart2way.py
gramps/plugins/gramplet/fanchart2waygramplet.py
The first two mention Cairo. I’m not sure if one plugin can access/actuate that context/resource in another, though.
FYI, I found the original fan-chart (not 2-way fan-chart) implementation discussion, which was an endearing read:
https://www.gramps-project.org/bugs/view.php?id=2611
I tried sharing the Github links to the files above as comments, but Discourse then flagged and hid the overall post as spam. I tried deleting the comments, but was told that I had done too many and was blocked for doing any further removals for twenty-four hours without any actually being removed at all. Funky policy.
EDIT: ← Apparently someone opted to remove my Github links to the files. Funky community.