Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arbre-app/read-gedcom
A modern Gedcom parser written in Typescript
https://github.com/arbre-app/read-gedcom
gedcom genealogy parser typescript
Last synced: about 1 month ago
JSON representation
A modern Gedcom parser written in Typescript
- Host: GitHub
- URL: https://github.com/arbre-app/read-gedcom
- Owner: arbre-app
- License: mit
- Created: 2020-08-31T18:52:20.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-09-25T21:22:46.000Z (about 1 year ago)
- Last Synced: 2024-11-04T16:54:19.030Z (about 2 months ago)
- Topics: gedcom, genealogy, parser, typescript
- Language: TypeScript
- Homepage: https://docs.arbre.app/read-gedcom
- Size: 601 KB
- Stars: 15
- Watchers: 3
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-gedcom - read-gedcom - A modern GEDCOM parser with type declarations (Parsers / JavaScript/Node.js)
README
# read-gedcom
![](https://github.com/arbre-app/read-gedcom/actions/workflows/build.yml/badge.svg)
![](https://img.shields.io/npm/v/read-gedcom?color=brightgreen)
![](https://img.shields.io/librariesio/dependents/npm/read-gedcom)
![](https://img.shields.io/npm/l/read-gedcom?color=brightgreen)***A Gedcom file reader written in Typescript.*** See the **[documentation](https://docs.arbre.app/read-gedcom/)**.
### 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
* Less than `20kB` gzipped
* ...and more:
* Conversion of dates
* Serialization-friendly
* Progress tracking for larger files### Installation and Usage
```
npm install read-gedcom
``````javascript
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());
});
```Or, if you simply want to include it as a javascript file, this is also possible:
```htmlconst promise = fetch('https://mon.arbre.app/gedcoms/royal92.ged')
.then(r => r.arrayBuffer())
.then(Gedcom.readGedcom);promise.then(gedcom => {
console.log(gedcom.getHeader().toString());
});```
### Documentation
* **[Quick Start](https://docs.arbre.app/read-gedcom/pages/Getting%20Started/quickstart)**
* **[Basic Examples](https://docs.arbre.app/read-gedcom/pages/Getting%20Started/basic-examples)**
* **[Advanced Examples](https://docs.arbre.app/read-gedcom/pages/Getting%20Started/advanced-examples)**
* **[API](https://docs.arbre.app/read-gedcom/modules)**### Bug report
A Gedcom file isn't parsed correctly? Please [open a ticket](https://github.com/arbre-app/read-gedcom/issues)!
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](https://github.com/arbre-app); we will create a minimal reproducible example based on what you sent us, which can be safely shared.