GEDCOM 7.0 is a breaking change with GEDCOM 5.5.1. This means that 5.5.1 files cannot be parsed as-is as if they were 7.0 files. This project is a zero-dependency public-domain ANSI-C implementation of a 5.5.1 to 7.0 converter. C was chosen because it as very few features, so it should be able to convert the code to other languages easily; and because many other languages have methods for calling C code natively.
Current status:
CONC
@
usageLANG
payloads to BCP 47 tags, using FHISO's mappingDATE
PHRASE
structureBC
and B.C.
to BCE
and remove if found in unsupported calendarsPHRASE
sBET
/AND
AGE
0y
, child as < 8y
, infant as < 1y
) with PHRASE
sAGE
payloadsy
MEDI
.FORM
payloads to media typesINDI
.NAME
/
surname/
with name part_RUFNAME
to RUFNAME
PLAC
structures to PLACE
records and WHERE
pointers theretoPHRASE
sSOUR
with text payload into pointer to SOUR
with NOTE
NOTE
record or with pointer payload into SNOTE
OBJE
with no payload to pointer to new OBJE
recordFONE
and ROMN
to TRAN
and their TYPE
s to BCP-47 LANG
sEMAI
, _EMAIL
→ EMAIL
FORM
.TYPE
→ FORM
.MEDI
_SDATE
→ SDATE
-- _SDATE
is also used as "accessed at" date for web resources by some applications so this change is not universally correct_UID
→ UID
_ASSO
→ ASSO
_CRE
, _CREAT
→ CREA
_DATE
→ DATE
ASSO
.RELA
→ ASSO
.ROLE
(changing payload OTHER + PHRASE)RFN
, RIN
, and AFN
to EXID
_FSFTID
, _APID
to EXID
SUBN
, HEAD
.FILE
, HEAD
.CHAR
HEAD
.PLAC
was originally on this list, but has been deferred to a later versionFILE
payloads into URLs
\
becomes /
C:\WINDOWS
becomes file:///c:/WINDOWS
/User/foo
becomes file:///User/foo
GEDC
.VERS
to 7.0
INDI
.ALIA
into NAME
with TYPE
AKA
XYZ
into _EXT_XYZ
NOTE
to nested-NOTE
instead of SNOTE
SCHMA
for all used known extensions
Edit Makefile
as needed; likely changes include
CC := clang
to your C compilerged5to7
to ged5to7.exe
Then run make
.
To instead build using Visual Studio, simply open the c-converter.sln file with Visual Studio and build the solution normally.
To run, execute the resulting ged5to7
.
Run ged5to7 --help
for a list of command-line options.
The code is designed to be thread-safe (no mutable globals or static
locals) though threading has not yet been added.
The code is currently first-draft status by someone who usually does not write large code bases others read.
It has inconsistent naming (e.g., ged_destroy_event
vs changePayloadToDynamic
),
some shortcuts (e.g., some struct
s are allocated as long
s and cast to struct
),
inconsistent style (e.g., three different ways to emit locally-created GedEvent
s),
etc.
In some places some energy was spent making it efficient, in other places it is definitely not as efficient as it easily could be.
Overall, the code needs a major refactor before it is easy to read.