go-gedcom is a Go library for parsing GEDCOM files. It was created primarily for use in manipulating GEDCOM v7 files. The intent is to provide a simple way to validate, batch edit, and otherwise process genealogical data.
This package is currently compatible with GEDCOM v7.0.11. ABNF grammars are loaded when the gedcom7
package is initialized at runtime. So long as there are no breaking changes to the specifications, newer
versions of the GEDCOM standard should be compatible with this package. Potential breaking changes include
- Changes to the ABNF grammar core data types
There are a few parts to this repository:
- CLI tool which uses the packages to provide functionality for manipulating GEDCOM files.
- Core packages to parse and manipulate GEDCOM files.
gedcom
- Interface definition for gedcom documents.
- node.go provides the tree structure for records.
gedcom7
- Implementation of the gedcom interface for GEDCOM v7 files.gedcom7/gc70val
- Validation rules for GEDCOM v7 files derived from the published abnf grammar.
- Supporting packages
abnf
- A parser for ABNF grammars.stack
- A fork of a useful stack implementation used to parse GEDCOM files.uuid
- A client wrapper to generate UUIDs for GEDCOM records.
First, get the package:
git clone https://github.com/funwithbots/go-gedcom.git
Modify the existing cli tool in /cli
or create your own.
Download dependencies to your local module cache and build the cli.
make get
make cli
Run some development-related tasks.
make vet
make test
# Pass flags to the underlying golang command.
make test ARGS='-v -failfast'
# Run tests on specific packages
make test PKGS=./pkg/gedcom7/...
- go 1.18+
To contribute to this project, fork the repository, create a new branch, and submit a pull request.
At a minimum, pull requests must pass the following checks:
- all tests must pass
- linting must pass using golangci-lint
Workflows run these checks automatically when branches are pushed.
- Support for GEDCOM v5.5.1
- Converter to/from GEDCOM v5.5.1 and v7
- Split tool to export a subset of the GEDCOM file.
- Graphing tool to allow batch creation of typical genealogical charts.
- Validation for GEDCOM file structures.
- Reporting tool for creating reports from GEDCOM files.
- Full Record comparison tool
- 0.1
- Initial Release
This project is licensed under the [GNU General Public License v3.0] - see the LICENSE file for details
This software is provided AS-IS without any warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the software is with you. Should the software prove defective, you assume the cost of all necessary servicing, repair, or correction.
Inspiration, code snippets, etc.