Skip to content

arbre-app/read-gedcom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

43dbd4b · Sep 19, 2021

History

60 Commits
Sep 19, 2021
Sep 19, 2021
Sep 15, 2021
Sep 19, 2021
Sep 17, 2021
Sep 14, 2021
Jun 29, 2021
Sep 13, 2020
Sep 16, 2021
Sep 19, 2021
Sep 19, 2021
Sep 19, 2021
Sep 11, 2021
Sep 14, 2021
Sep 15, 2021
Sep 14, 2021

Repository files navigation

read-gedcom

A Gedcom file reader written in Typescript. See the documentation.

Features

  • Tolerant parsing
    • Character encoding detection (ASCII, CP1252, UTF-8, UTF-16, CP850, and more)
    • Good effort of parsing and interpreting non-standard data
  • Near full specification coverage
    • Mostly Gedcom 5.5.5 compliant while being as much backward compatible as possible
    • Parser for dates in any standard calendars
  • Unopinionated API
    • We provide the API, but the user has full control over the interpretation of the data
    • It's also possible to not use the API, in which case it can be shaken off the tree
  • Strongly typed
  • Zero dependencies; compatible on browser and Node.js
  • ...and more:
    • Conversion of dates
    • Serialization-friendly
    • Progress tracking for larger files

Installation and Usage

npm install read-gedcom
import { readGedcom } from 'read-gedcom';

const promise = fetch('https://mon.arbre.app/gedcoms/royal92.ged')
  .then(r => r.arrayBuffer())
  .then(readGedcom);

promise.then(gedcom => {
  console.log(gedcom.getHeader().toString());
});

Documentation

Bug report

A Gedcom file isn't parsed correctly? Please open a ticket!

Also make sure to attach a zipped version of the bogus Gedcom file. If you don't want to publicly share the file, you may send it to this email address; we will create a minimal reproducible example based on what you sent us, which can be safely shared.