Gedcom 7 Library [ Future basis of a new Gedcom 7 import addon ]

FYI, after 2 years of break, I got back to working on Gedcom 7. In the last few days, I worked on a library which can form the basis of a new Gedcom 7 import addon. It is written from scratch and does not attempt to parse invalid Gedcom files.

This is not ready for testing, but wanted to announce it early in case somebody has input.

It’s based on an improved version of my parser

10 Likes

Here is a draft pull request:

Looking forward to feedback.

4 Likes

Is there any way I can get this into the Windows version of Gramps?
Is this just an import module, or does export also support it?

It is an importer only. You you can hand install. But it is still experimental.

And until Gramps has its data model changed to support GEDCOM7 features (or has standardized on how to store that data as custom types), GEDCOM 5.5.1 export is still the lowest common denominator.

…with the exception of media objects, of course.

1 Like

How can i do this in Win? Not with pip …

I don’t know, but this snippet in the Gramps source code seems to imply it is possible to use pip. Only that this snippet will not work in this case, becase the module name (gramps_gedcom7) is not the same as the package name (gramps-gedcom7), which is what is needed for pip (see comment in the draft PR).

Greg Lamberson (BetterGEDCOM founder) just posted an extensive note to his 2021 GEDCOM7 feature request:

I wanted to update this thread with some significant developments in the GEDCOM 7 extension ecosystem that directly address GRAMPS needs.

12226: [GEDCOM 7]Support Import & Export of New (June 2021) version

Plus a Pull Request to David Straub’s GEDCOM7 repository

4 Likes

Also Greg now has a PR on FamilySearch:

5 Likes

I really like this Evidences library approach. I’ve tried* to create something similar through attributes including notes typed as To Do, Analysis, etc., and source citations, but each time you have to create the attribute in a structure that allows it (a Person record, an Event record, etc.). The idea here is (would be) to have (in Gramps) an Evidence view with objects and sub-objects of this type that you then link to traditional Gramps objects, as you do for an event linked to a family or an individual.

If it could have its counterpart implemented in Gramps, that would be fantastic.


* For example, my personal approach:

On the left side of the image, a Workflow attribute associated (duplicated) with two persons is designed to say what I want to do. In that case looking for a way to: Eventuelle fusion d’individus[fr] = Possible merger of individuals[en].

It includes two notes: the first one is a To do note describing in more details what I want to do: Trouver s’il est possible de fusionner les deux individus Puel, Jean (I07028 & I02026) en un seul[fr] = Find out if it is possible to merge the two individuals Puel, Jean (I07028 & I02026) into one[en], and a second one which is my hypothesis: En plus de l’année de naissance identique, la signature des deux individus Puel, Jean (I07028 & I02026) est similaire[fr] = In addition to the identical year of birth, the signature of the two individuals Puel, Jean (I07028 & I02026) is similar[en]

On the right side of the image, another attribute associated to an Education event, its an Allegation type attribute, reusing the hypothesis in its title (and in its first note): Status (Non_prouvée/Prouvée/Réfutée) [N] - [Puel, Jean (I07028 & I02026) sont une seule personne] Leurs signatures similaires le prouvent[fr] = Status (Not_proven/Proven/Refuted) [N] - [Puel, Jean (I07028 & I02026) are one person] Their similar signatures prove it[en].

It includes another To do note Enregistrer l’acte de décès. Marquet, Guillaume du 8-06-28 (Républicain) à Béziers original (issu des registres des AD) pour y trouver la signature de Puel, Jean[fr] = Register the death certificate. Marquet, Guillaume dated 8-06-28 (Republican) in Béziers original (from the AD registers) to find the signature of Puel, Jean[en]

(I already have signature for the other Jean Puel record)


This is a bit of a DIY project, as there are no Evidence objects. Attributes cannot be unique, so they must be duplicated when you want to associate them with two records (which must also support attributes - which is not the case for Place records, for example), and maintaining their consistency requires ensuring what the notes they contain refer to, etc. With the integrated approach proposed here, it would be much more practical and easier to use.


Here, another example with 3 allegations to search for a person’s death. The first one is refuted with a reservation on the final date, a reservation which I have not yet found a way to indicate very clearly (putting the information at the end of the attribute title):

1 Like

Is testing on the horizon?

Oh, I forgot that I had written it’s not ready for testing.

Yes, testing is very much welcome!

I released a new version of the library yesterday, so make sure to update it:

python -m pip install --upgrade gramps-gedcom7
3 Likes

Hey all, I just created a Streamlit web app that makes the GEDCOM 7 import library available as a web app that directly exports to Gramps XML! You can find it here:

As you can tell from the looks, I had some help from AI. But it’s really just a thin wrapper around the libraries import function and Gramps core’s export function.

I want to actually recommend this to Gramps Web users in the future: they can simply convert their files there and then directly feed the Gramps XML into Gramps Web. But of course it’s potentially useful for Gramps Desktop users as well - they won’t need to install an addon anymore.

Data sensitive users can also trivially run the web app locally (see Readme of GitHub - DavidMStraub/gramps-gedcom7: Library for a future GEDCOM 7 import plugin for Gramps ).

The next step will be to start adding import options to the library and expose these options via appropriate widgets (dropdowns etc.) in Streamlit.

EDIT: It looks like there is a weird error that when clicking on the link above, the stylesheet and fonts do not load. When I copy the URL https://gramps-gedcom7.streamlit.app/ into the address bar, it works fine (I am using Firefox). Not sure what happens exactly.

3 Likes

I tried to use the https://gramps-gedcom7.streamlit.app/ Streamlit web app using Firefox 142.0.1 on Fedora 37.

Drag’n’drop and the Browse button did not work. The (apparent) landing pad was an unscalable icon (cloud with an ‘up arrow’, always at 100% width regardless of zoom scale).

Dragging a .ged file from the Files chooser to the dialog just shows an OS Open with application chooser:

The Browse files button did nothing.

That’s what I meant with

If you copy the URL into a new tab, it should work. Apparently Discourse does something weird when redirecting.

1 Like

It seems to be bypassing the stylesheet on redirects.

A hotlink from a Gramps-Project.org MediaWiki page or and “Internet” person record in Gramps did load the CSS correctly.

It works as expected for me in Firefox on Windows. Very occasionally I’ve had pages where the style sheet doesn’t load properly but using shift F5 to force a complete reload of the page usually fixes it. Failing that, clearing cookies restores things to how they should be.

Ignore that, I was clicking on the wrong link. The one to streamlit does fail for me as well.

I converted a small sample 5.5.1 file with this utility. The biggest problems was that it did not preserve the CSV hierarchical Place data. A PLAC Gettysburg, Adams County, Pennsylvania, USA dropped to just Gettysburg

And unfortunately, it writes XML as Gramps 6.0.5 version. I’m still running 5.2.2 as my primary workstation. So it cannot be read. Although it probably needs the expanded data model, it seems like it could write as 6.0.0 for greater compatibility.

A post was merged into an existing topic: Whither GEDCOM goest

6.0.5 and 6.0.0 have the same data model.

I don’t plan to support Gramps older than 6.0 in the new GEDCOM library.

That is true. However, the Gramps Import seems to be very fussy.

If the XML file says it was written be Gramps 6.0.5, then Gramps 6.0.4 (and earlier) complains about needing to be upgraded before it can open the file.

So please identify the generated files with the lowest common denominator XML and Gramps version. That way the converter files will work with the broadest group of Gramps 6 users.