This repository contains code for doing FamilySearch GEDCOM 7 operations on Windows. It contains:
- Gedcom7 - a project that builds a GEDCOM parser library.
- GedCompare - a project that builds a command-line interface that uses the above library to do file comparison.
- GedValidate - a project that builds a command-line interface that uses the above library to do file validation.
The same Gedcom7 library is used by the online web site tools:
- GEDCOM 5.5.1 to 7.0 converter
- GEDCOM Validator
- FamilySearch GEDCOM 7 Compatibility web tool which should give the same results as the GedCompare command-line tool here.
- Windows 10 or above
- Visual Studio 2022, any edition (the free Community edition will do)
GedValidate.exe is a command-line tool usable as follows.
usage: GedValidate <filename>
to check a file as being a valid FamilySearch GEDCOM 7 or GEDZIP file
The filename should end in .ged or .gdz.
GedCompare.exe is a command-line tool usable as follows.
usage: GedCompare <filename1> <filename2>
to simply compare two GEDCOM files
GedCompare <filename>
to generate a FamilySearch GEDCOM 7 compatibility report
For example to check GEDCOM 7 compatibility, filename1 should be the maximal70.ged file from the Tests/samples directory, and filename2 should be a file generated by importing maximal70.ged into some other program and then exporting it as FamilySearch GEDCOM 7.
The GEDCOM7 parser library can be used as follows.
GedcomFile gedcomFile = new GedcomFile();
List<string> errors = gedcomFile.LoadFromPath(fileName);
if (errors.Count > 0) {
// ... handle file errors ...
}GedcomFile gedcomFile = new GedcomFile();
List<string> errors = gedcomFile.LoadFromString(text);
if (errors.Count > 0) {
// ... handle file errors ...
}List<string> errors = file.Validate();
if (errors.Count > 0) {
// ... handle validation errors ...
}GedcomFile gedcomFile1 = ...
GedcomFile gedcomFile2 = ...
GedcomComparisonReport report = gedcomFile1.Compare(gedcomFile2);
// ... use report.StructuresAdded, report.StructuresRemoved, etc. ...GedcomFile gedcomFile = ...
GedcomCompatibilityReport report = new GedcomCompatibilityReport(gedcomFile);
// ... use various members of report ...