Generate genealogical charts from GEDCOM files
Project description
GedGraph
Generate genealogical charts from GEDCOM files using GraphViz.
Features
- Pedigree Charts: Visualize ancestors of an individual
- Relationship Charts: Find and visualize relationships between two individuals
- Hourglass Charts: Show ancestors and descendants or split by parental lines
- Bowtie Charts: Horizontal hourglass layout with left-right orientation
- Smart Path Finding: Automatically finds the shortest relationship path using breadth-first search
- Relationship Prioritization: Prefers blood relationships via male line, then female line, then half-blood relationships
- Multiple Path Detection: Identifies when multiple equally short paths exist
- Spouse Visualization: Shows spouses/partners alongside the direct bloodline
- Marriage Status Indicators: Solid lines for married couples, dashed lines for unmarried couples
- Flexible Date Handling: Uses birth/death dates with fallback to baptism/burial dates
- Enhanced Name Formatting: Supports GEDCOM name components (prefix, title, given, surname, suffix)
- Progress Feedback: Braille-spinner progress indicators with
--verbose,--quiet, and--no-coloroptions - GraphViz Output: Generates DOT files that can be rendered to various image formats
Prerequisites
- Python 3.10+
- GraphViz (
dotcommand) installed on your system to render DOT files to images
Installation
pip install kimon-gedgraph
Development Setup
# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install in editable mode with dev dependencies
pip install -e ".[dev]"
Usage
Pedigree Chart
Generate a pedigree chart showing ancestors of an individual:
gedgraph pedigree family.ged @I10@ -o output.dot
Options:
-g, --generations: Number of generations to include (default: 4)
Example:
gedgraph pedigree family.ged @I10@ -g 5 -o pedigree.dot
Relationship Chart
Find and visualize the relationship between two individuals:
gedgraph relationship family.ged @I10@ @I20@ -o output.dot
Options:
-d, --max-depth: Maximum search depth (default: 50)
Example:
gedgraph relationship family.ged @I1@ @I50@ -d 15 -o relationship.dot
Hourglass Chart
Visualize ancestors and descendants or split by parental lines:
# Ancestors above, descendants below
gedgraph hourglass family.ged @I10@ -v descendants -o hourglass.dot
# Father's line above, mother's line below
gedgraph hourglass family.ged @I10@ -v ancestor-split -o hourglass.dot
Options:
-g, --generations: Number of generations in each direction (default: 4)-v, --variant: Chart variant -ancestor-splitordescendants(default: ancestor-split)
Bowtie Chart
Horizontal hourglass layout with left-right orientation:
# Ancestors left, descendants right
gedgraph bowtie family.ged @I10@ -v descendants -o bowtie.dot
# Father's line left, mother's line right
gedgraph bowtie family.ged @I10@ -v ancestor-split -o bowtie.dot
Options:
-g, --generations: Number of generations in each direction (default: 4)-v, --variant: Chart variant -ancestor-splitordescendants(default: ancestor-split)
Global Options
These flags must appear before the subcommand name:
# Suppress progress output
gedgraph --quiet pedigree family.ged @I10@ -o output.dot
# Show progress with timing
gedgraph --verbose relationship family.ged @I10@ @I20@ -o output.dot
# Disable colored output
gedgraph --no-color hourglass family.ged @I10@ -o output.dot
| Flag | Description |
|---|---|
--verbose |
Show detailed progress with timing |
-q, --quiet |
Suppress progress output |
--no-color |
Disable colored output |
Rendering DOT Files
Convert DOT files to images using GraphViz:
# PNG
dot -Tpng output.dot -o output.png
# PDF
dot -Tpdf output.dot -o output.pdf
# SVG
dot -Tsvg output.dot -o output.svg
Relationship Path Sorting
When multiple equally short paths exist between two individuals, GedGraph prioritizes them in this order:
- Full blood relationships via male line
- Full blood relationships via female line
- Half-blood relationships via male line
- Half-blood relationships via female line
The tool will generate charts for all paths of equal shortest length.
Example Output
The generated DOT files include:
- Comments: Generation distance, path length, and relationship description
- Color Coding:
- Start individual (coral)
- End individual (light blue)
- Direct bloodline (light green)
- Spouses/partners (light yellow)
- Labels: Names with birth/death years in (YYYY - YYYY) format
- Relationship Lines:
- Solid arrows for parent-child relationships
- Solid lines for married couples
- Dashed lines for unmarried couples
- Horizontal Alignment: Spouses are positioned next to their partners using rank constraints
Error Handling
GedGraph will exit with an error if:
- The GEDCOM file doesn't exist
- An individual ID is not found in the GEDCOM file
- No relationship exists between two individuals (for relationship charts)
Development
See DEVELOPER.md for development setup and architecture details.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kimon_gedgraph-1.1.0.tar.gz.
File metadata
- Download URL: kimon_gedgraph-1.1.0.tar.gz
- Upload date:
- Size: 23.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9fff1563413fc136742e77386cd3cff9b89d68c975d3b4bbee6f4ad91020544
|
|
| MD5 |
96d0b7c611e14c43aaa8bb142c0c74da
|
|
| BLAKE2b-256 |
1d5a421ff18eb0529bcd64400fea52def869db415f6082c45242a102e186279e
|
Provenance
The following attestation bundles were made for kimon_gedgraph-1.1.0.tar.gz:
Publisher:
publish.yml on kimon1230/gedgraph
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kimon_gedgraph-1.1.0.tar.gz -
Subject digest:
b9fff1563413fc136742e77386cd3cff9b89d68c975d3b4bbee6f4ad91020544 - Sigstore transparency entry: 1045500878
- Sigstore integration time:
-
Permalink:
kimon1230/gedgraph@583362886ca0f107f502f440bafd2fcfca9a313a -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/kimon1230
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@583362886ca0f107f502f440bafd2fcfca9a313a -
Trigger Event:
release
-
Statement type:
File details
Details for the file kimon_gedgraph-1.1.0-py3-none-any.whl.
File metadata
- Download URL: kimon_gedgraph-1.1.0-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6e00ac465a349cc27ebf0bb8d285a3a8e41602565e061b5927b18b366d33edd
|
|
| MD5 |
d384074cb39eb8a8c244f5bc2c337392
|
|
| BLAKE2b-256 |
c7b3f18054a80dddfd26721d981cdca8edaa17f389aea916f1e57045355d5a47
|
Provenance
The following attestation bundles were made for kimon_gedgraph-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on kimon1230/gedgraph
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kimon_gedgraph-1.1.0-py3-none-any.whl -
Subject digest:
c6e00ac465a349cc27ebf0bb8d285a3a8e41602565e061b5927b18b366d33edd - Sigstore transparency entry: 1045500886
- Sigstore integration time:
-
Permalink:
kimon1230/gedgraph@583362886ca0f107f502f440bafd2fcfca9a313a -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/kimon1230
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@583362886ca0f107f502f440bafd2fcfca9a313a -
Trigger Event:
release
-
Statement type: