genealogical data tooling
- Ingest GEDCOM data, a defacto standard file format spec for genealogical data
- Calculate relationships between family members via common ancestors
- View, peruse records in the terminal
- Draw a family tree from GEDCOM data
- Structured, leveled logging messages written to standard error
Required tooling:
Optional, but recommended tooling:
- bkt, to cache views when interactively exploring data
- fzf, to enhance calculating relationships between people
- jq, view parsed data as JSON
The justfile defines the most common operations.
# list tasks
$ just
# get, tidy, vendor application dependencies
$ just mod
# build, run binary
$ just build
$ just run
$ just buildrun
Tests
$ just test
# run tests on a specific package path
$ just test ./internal/repo/...
# run tests with some flags
$ just ARGS='-v -count=1 -failfast' test
# run tests on a specific package path, while also specifying flags
$ just ARGS='-v -run TestFoo' test ./internal/gedcom/...
Static analysis
$ just vet
Presumably, you have some of your own GEDCOM data. If you don't, there are
samples in testdata/
. These examples use that testdata.
Optionally, establish a working directory.
$ mkdir /tmp/ged && chmod -v 700 /tmp/ged
Take GEDCOM data as input and output a family tree as an SVG or PNG.
# By default, it renders a SVG
$ bin/main draw < testdata/simpsons.ged > /tmp/ged/simpsons.svg
# Render a PNG
$ bin/main draw -output-format=png < testdata/simpsons.ged > /tmp/ged/simpsons.png
Under the hood, a Mermaid flowchart is constructed from the GEDCOM data. Then that flowchart is rendered into a standard image format.
Another output format is the Mermaid flowchart itself. The use case here is for any manual edits you may want to do before rendering it again.
$ bin/main draw -output-format=mermaid < testdata/simpsons.ged > /tmp/ged/simpsons.mermaid
# ... manual adjustments to Mermaid flowchart file ...
# to render the manually-modified Mermaid flowchart, just specify the input-format
$ bin/main draw -input-format=mermaid < /tmp/ged/simpsons.mermaid > /tmp/ged/simpsons.svg
Calculate relationship between 2 people.
If you have fzf on your system, then use fuzzy search to select the people.
$ ./explore-data.sh relate testdata/kennedy.ged
If you don't have fzf or don't want to use it, specify the IDs of the people like so:
$ bin/main explore-data relate -p1 @I0@ -p2 @I10@ < testdata/kennedy.ged
Display details on a person in a simple group sheet view.
If you have fzf on your system, then use fuzzy search to select the people.
$ ./explore-data.sh show testdata/kennedy.ged
If you don't have fzf or don't want to use it, specify the ID of the person like so:
$ bin/main explore-data show -target-id @I10@ < testdata/kennedy.ged