Generate genealogical charts from GEDCOM files using GraphViz.
- 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)
- GraphViz Output: Generates DOT files that can be rendered to various image formats
# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txtGenerate a pedigree chart showing ancestors of an individual:
python gedgraph.py pedigree family.ged @I10@ -o output.dotOptions:
-g, --generations: Number of generations to include (default: 4)
Example:
python gedgraph.py pedigree family.ged @I10@ -g 5 -o pedigree.dotFind and visualize the relationship between two individuals:
python gedgraph.py relationship family.ged @I10@ @I20@ -o output.dotOptions:
-d, --max-depth: Maximum search depth (default: 50)
Example:
python gedgraph.py relationship family.ged @I1@ @I50@ -d 15 -o relationship.dotVisualize ancestors and descendants or split by parental lines:
# Ancestors above, descendants below
python gedgraph.py hourglass family.ged @I10@ -v descendants -o hourglass.dot
# Father's line above, mother's line below
python gedgraph.py hourglass family.ged @I10@ -v ancestor-split -o hourglass.dotOptions:
-g, --generations: Number of generations in each direction (default: 4)-v, --variant: Chart variant -ancestor-splitordescendants(default: ancestor-split)
Horizontal hourglass layout with left-right orientation:
# Ancestors left, descendants right
python gedgraph.py bowtie family.ged @I10@ -v descendants -o bowtie.dot
# Father's line left, mother's line right
python gedgraph.py bowtie family.ged @I10@ -v ancestor-split -o bowtie.dotOptions:
-g, --generations: Number of generations in each direction (default: 4)-v, --variant: Chart variant -ancestor-splitordescendants(default: ancestor-split)
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.svgWhen 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.
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
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)
See DEVELOPER.md for development setup and architecture details.
MIT