2012/5/25 Bastien Jacquet <email@example.com>
I'm willing to help, but my OO python skill are quite limited.... (I am used to object oriented c++ though)
So I cannot come up with the design, but once you have decided on this, I will be happy to help. [Since I really want to be able to export as much data to GeneaNet]
Did you manage?
It seems Gedcomwriter usees __ for methods, so inheriting is officially diallowed.
I never understood many of the designreasons to make so many things private instead of protected.
You can circumvent that in python however, but writing becomes longer.
So, assuming you could inherit the methods without problems, your 3th party plugin would be as a quick hack:
def __dump_event_stats(self, event, event_ref):
super(MyGedcomWriter, self).__dump_event_stats(event, event_ref)
def __myfamily_event_witness(self, event, level):
' here your new code'
A file with this, and correct import statements, and then a gpr.py file so the plugin will be loaded in Gramps.
As inheritance does not work for __, you will need to call however
super(MyGedcomWriter, self)._GedcomWriter__dump_event_stats(event, event_ref)