Skip to main content

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)
  • GraphViz Output: Generates DOT files that can be rendered to various image formats

Prerequisites

  • Python 3.10+
  • GraphViz (dot command) 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-split or descendants (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-split or descendants (default: ancestor-split)

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:

  1. Full blood relationships via male line
  2. Full blood relationships via female line
  3. Half-blood relationships via male line
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kimon_gedgraph-1.0.0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kimon_gedgraph-1.0.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file kimon_gedgraph-1.0.0.tar.gz.

File metadata

  • Download URL: kimon_gedgraph-1.0.0.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kimon_gedgraph-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cf78042815ecf389e955c9a7ffff1c3a32be9989cc628d1f87e3efb5615affc7
MD5 d3960ddca74dae4c940b83515abd433c
BLAKE2b-256 f367d318f97fbc5d4fc7066110fbb76b29121b1d2449b5b7497efbb7b72337c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for kimon_gedgraph-1.0.0.tar.gz:

Publisher: publish.yml on kimon1230/gedgraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kimon_gedgraph-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: kimon_gedgraph-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kimon_gedgraph-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9a98d5ed42b2f72dca28a525078d21b801954c36f2d526be1b87801a0b1ca888
MD5 0306b7d86caa355d9eaf4e92d1a861ab
BLAKE2b-256 71237cce6b1f9b8186ba3ebc7f02f10a8a91014cc71457bb2ad393bb14ad7981

See more details on using hashes here.

Provenance

The following attestation bundles were made for kimon_gedgraph-1.0.0-py3-none-any.whl:

Publisher: publish.yml on kimon1230/gedgraph

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page