There has been some discussion of making Gramps capable of recognizing versions of GEDCOM and and branching to version specific GEDCOM parsers.
Perhaps we could discuss how that might be implemented?
Since all the versions shared the same .ged file extension and meta data in file properties is, at best, not dependably existent; it seems like reading the header is going to be the only reliable deciding factor.
This seems like an opportunity to do something with the GEDCOM Header information that is currently discarded stored inconspicuously (as source attributes) during import. It contains Submitter info (Author), SOURce + VERSion (Publ.info.), date the file was written (Date), Line number (Volume/Page) and more. A new source could include a Note containing a nicely parsed information from a HEADer. Both pygedcom and ged4py.parser have parsing for GEDCOM headers.
I was just looking at the output after selecting Preferences options for the Import tab .
Looking that the Citations that are created during an import, the content is virtually blank.
SAMPLE GEDCOM with header and 1 person
0 HEAD
1 SOUR FamilySearch GEDCOM
2 VERS 5.5.1
2 NAME FamilySearch.org
2 CORP FamilySearch International
3 ADDR 50 North West Temple Street
4 CITY Salt Lake City
4 STAE UT
4 POST 84150
4 CTRY USA
2 NOTE Exported by FamilySearch Web Application
1 DEST GEDCOM 5.5.1 Compatible Systems
1 DATE 19 FEB 2002
2 TIME 15:31:00
1 FILE JonesFamilyTree.ged
1 GEDC
2 VERS 5.5.1
2 FORM LINEAGE-LINKED
1 CHAR UTF-8
1 LANG English
1 PLAC
2 FORM City, County, State, Country
1 SUBM @SUBM1@
0 @SUBM1@ SUBM
1 NAME Thomas Jones
1 ADDR 123 Main Street
2 CITY Anytown
2 STAE TX
2 POST 75000
2 CTRY USA
1 EMAIL thomas.jones@example.com
1 PHON +1-214-555-0123
0 @I1@ INDI
1 NAME John James /Doe/ III
1 SEX M
1 BIRT
2 DATE ABT 1800
2 PLAC USA
1 DEAT
2 DATE BET 1 JUL 1863 AND 3 JUL 1863
2 PLAC Gettysburg, Adams County, Pennsylvania, USA
2 NOTE Died in the Battle of Gettysburg
0 TRLR
The GEDCOM7 to Gramps XML at https://gramps-gedcom7.streamlit.app/ by @DavidMStraub also drops the HEAD info when successfully converts this sample to:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE database PUBLIC "-//Gramps//DTD Gramps XML 1.7.2//EN"
"http://gramps-project.org/xml/1.7.2/grampsxml.dtd">
<database xmlns="http://gramps-project.org/xml/1.7.2/">
<header>
<created date="2025-10-10" version="6.0.5"/>
<researcher>
</researcher>
</header>
<events>
<event handle="_1e82c3f877bf43b1a6d49278fcf865b4" change="1760133348" id="E0001">
<type>Death</type>
<daterange start="1863-07-01" stop="1863-07-03"/>
<place hlink="_91f8757ef6d8453ea53b4cc028d6ee84"/>
<noteref hlink="_2b26a434a79b471783e793b7a65857a2"/>
</event>
<event handle="_28bf1ea007a44306a080254d1d235918" change="1760133348" id="E0000">
<type>Birth</type>
<dateval val="1800" type="about"/>
<place hlink="_5a883a408eab41beb7866bdf7a23d862"/>
</event>
</events>
<people>
<person handle="_4c2f18f7a1d14b01bbb8c1d332ab5784" change="1760133348" id="I1">
<gender>M</gender>
<name type="Birth Name">
<first>John James</first>
<surname>Doe</surname>
<suffix>III</suffix>
</name>
<eventref hlink="_28bf1ea007a44306a080254d1d235918" role="Primary"/>
<eventref hlink="_1e82c3f877bf43b1a6d49278fcf865b4" role="Primary"/>
</person>
</people>
<places>
<placeobj handle="_5a883a408eab41beb7866bdf7a23d862" change="1760133348" id="P0000" type="Unknown">
<pname value="USA"/>
</placeobj>
<placeobj handle="_91f8757ef6d8453ea53b4cc028d6ee84" change="1760133348" id="P0001" type="Unknown">
<pname value="Gettysburg"/>
</placeobj>
</places>
<notes>
<note handle="_2b26a434a79b471783e793b7a65857a2" change="1760133348" id="N0000" type="Source Note">
<text>Died in the Battle of Gettysburg</text>
</note>
</notes>
</database>
The Gramps GEDCOM conversion is a bit more complete. And it did NOT discard much HEADer data. It just put it in unexpected places:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE database PUBLIC "-//Gramps//DTD Gramps XML 1.7.1//EN"
"http://gramps-project.org/xml/1.7.1/grampsxml.dtd">
<database xmlns="http://gramps-project.org/xml/1.7.1/">
<header>
<created date="2025-10-10" version="5.2.2"/>
<researcher>
<resname>Thomas Jones</resname>
<rescity>Anytown</rescity>
<resstate>TX</resstate>
<rescountry>USA</rescountry>
<respostal>75000</respostal>
<resphone>+1-214-555-0123</resphone>
<resemail>thomas.jones@example.com</resemail>
</researcher>
</header>
<tags>
<tag handle="_10022346ced81642810e01171bbe" change="1760136782" name="Imported 2025/10/10 17:53:02" color="#000000000000" priority="0"/>
</tags>
<events>
<event handle="_10022346cef7194d1aa660e81f36" change="1760136782" id="E0000">
<type>Birth</type>
<dateval val="1800" type="about"/>
<place hlink="_10022346cefc710503358b13e702"/>
</event>
<event handle="_10022346cf00365ee85b1e0c34a3" change="1760136782" id="E0001">
<type>Death</type>
<daterange start="1863-07-01" stop="1863-07-03"/>
<place hlink="_10022346cf064948c873fc9c95ca"/>
<noteref hlink="_10022346cf041080be572be97219"/>
</event>
</events>
<people>
<person handle="_10022346cef55675b2af1a4a8040" change="1760136782" id="I0001">
<gender>M</gender>
<name type="Birth Name">
<first>John James</first>
<surname>Doe</surname>
<suffix>III</suffix>
</name>
<eventref hlink="_10022346cef7194d1aa660e81f36" role="Primary"/>
<eventref hlink="_10022346cf00365ee85b1e0c34a3" role="Primary"/>
<citationref hlink="_10022346cf094e875f9b16769072"/>
<tagref hlink="_10022346ced81642810e01171bbe"/>
</person>
</people>
<citations>
<citation handle="_10022346cf094e875f9b16769072" change="1760136782" id="C0000">
<confidence>2</confidence>
<sourceref hlink="_10022346ced241d2d70c7615d6b9"/>
</citation>
</citations>
<sources>
<source handle="_10022346ced241d2d70c7615d6b9" change="1760136782" id="S0000">
<stitle>Import from JonesFamilyTree.ged</stitle>
<srcattribute type="Approved system identification" value="FamilySearch GEDCOM"/>
<srcattribute type="Version number of software product" value="5.5.1"/>
<srcattribute type="Name of software product" value="FamilySearch.org"/>
<srcattribute type="Generated By" value="FamilySearch.org 5.5.1"/>
<srcattribute type="Creation date and time of GEDCOM" value="2002-02-19 15:31:00"/>
<srcattribute type="GEDCOM version" value="5.5.1"/>
<srcattribute type="GEDCOM form" value="LINEAGE-LINKED"/>
<srcattribute type="Character set" value="UTF-8"/>
<srcattribute type="Language of GEDCOM text" value="English"/>
<reporef hlink="_10022346cedf3738c63d5e3206b8" medium="Unknown"/>
<reporef hlink="_10022346cef0a93619bb72f9175" medium="Unknown"/>
</source>
</sources>
<places>
<placeobj handle="_10022346cefc710503358b13e702" change="1760136782" id="P0000" type="Unknown">
<ptitle>USA</ptitle>
<pname value="USA"/>
</placeobj>
<placeobj handle="_10022346cf064948c873fc9c95ca" change="1760136782" id="P0001" type="City">
<ptitle>Gettysburg, Adams County, Pennsylvania, USA</ptitle>
<pname value="Gettysburg"/>
<placeref hlink="_10022346cf14205afbe419fc050f"/>
</placeobj>
<placeobj handle="_10022346cf0f4b07b3d43b7d3940" change="1760136782" id="P0002" type="Country">
<ptitle>USA</ptitle>
<pname value="USA"/>
</placeobj>
<placeobj handle="_10022346cf113a8bf995ce74ad27" change="1760136782" id="P0003" type="State">
<ptitle>Pennsylvania, USA</ptitle>
<pname value="Pennsylvania"/>
<placeref hlink="_10022346cf0f4b07b3d43b7d3940"/>
</placeobj>
<placeobj handle="_10022346cf14205afbe419fc050f" change="1760136782" id="P0004" type="County">
<ptitle>Adams County, Pennsylvania, USA</ptitle>
<pname value="Adams County"/>
<placeref hlink="_10022346cf113a8bf995ce74ad27"/>
</placeobj>
</places>
<repositories>
<repository handle="_10022346cedf3738c63d5e3206b8" change="1760136782" id="R0000">
<rname>Business that produced the product: FamilySearch International</rname>
<type>GEDCOM data</type>
<address>
<city>Salt Lake City</city>
<state>UT</state>
<country>USA</country>
<postal>84150</postal>
</address>
</repository>
<repository handle="_10022346cef0a93619bb72f9175" change="1760136782" id="R0001">
<rname>SUBM (Submitter): (@SUBM1@) Thomas Jones</rname>
<type>GEDCOM data</type>
<address>
<city>Anytown</city>
<state>TX</state>
<country>USA</country>
<postal>75000</postal>
<phone>+1-214-555-0123</phone>
</address>
<url href="thomas.jones@example.com" type="E-mail"/>
<noteref hlink="_10022346cef1152f5050bed449b8"/>
</repository>
</repositories>
<notes>
<note handle="_10022346ceea4f09669b820b6516" change="1760136782" id="N0000" type="GEDCOM import">
<text>Records not imported into HEAD (header):
ADDR element ignored '50 North West Temple Street' Line 6: 3 ADDR 50 North West Temple Street
Line ignored as not understood Line 11: 2 NOTE Exported by FamilySearch Web Application
</text>
<style name="fontface" value="Monospace">
<range start="0" end="285"/>
</style>
</note>
<note handle="_10022346cef1152f5050bed449b8" change="1760136782" id="N0001" type="GEDCOM import">
<text>Records not imported into SUBM (Submitter): (@SUBM1@) Thomas Jones:
ADDR element ignored '123 Main Street' Line 26: 1 ADDR 123 Main Street
</text>
<style name="fontface" value="Monospace">
<range start="0" end="172"/>
</style>
</note>
<note handle="_10022346cf041080be572be97219" change="1760136782" id="N0002" type="Event Note">
<text>Died in the Battle of Gettysburg</text>
<tagref hlink="_10022346ced81642810e01171bbe"/>
</note>
</notes>
</database>
That’s simply one of the things still missing in the library, see the placeholder here:
def handle_header(
structure: g7types.GedcomStructure, db: DbWriteBase, settings: ImportSettings
):
"""Handle a header record and import it into the Gramps database.
Args:
structure: The GEDCOM header structure to handle.
db: The Gramps database to import into.
"""
# TODO: Implement header import
pass
In GEDCOM 7, the header has a compulsory version field, so if it’s missing, the file is invalid.
1 Like
system
Closed
November 10, 2025, 2:52pm
4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.