Skip to content

ArmidaleSoftware/gedcom7

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GEDCOM 7 Library

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.

The same Gedcom7 library is used by the online web site tools:

Prerequisites

  • Windows 10 or above
  • Visual Studio 2022, any edition (the free Community edition will do)

GedCompare Command-line Tool Usage

GedCompare.exe is a command-line tool usable as follows.

Usage: GedCompare <filename1> <filename2>

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.

Gedcom7 library Usage

The GEDCOM7 parser library can be used as follows.

Loading a GEDCOM file from disk

GedcomFile gedcomFile = new GedcomFile();
List<string> errors = gedcomFile.LoadFromPath(fileName);
if (errors.Count > 0) {
    // ... handle file errors ...
}

Loading a GEDCOM file from memory

GedcomFile gedcomFile = new GedcomFile();
List<string> errors = gedcomFile.LoadFromString(text);
if (errors.Count > 0) {
    // ... handle file errors ...
}

Validating a GEDCOM file according to the FamilySearch GEDCOM 7 schema

List<string> errors = file.Validate();
if (errors.Count > 0) {
    // ... handle validation errors ...
}

Compare two GEDCOM files

GedcomFile gedcomFile1 = ...
GedcomFile gedcomFile2 = ...
GedcomComparisonReport report = gedcomFile1.Compare(gedcomFile2);
// ... use report.StructuresAdded, report.StructuresRemoved, etc. ...

Test GEDCOM 7 compatibility

GedcomFile gedcomFile = ...
GedcomCompatibilityReport report = new GedcomCompatibilityReport(gedcomFile);
// ... use various members of report ...

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published