Skip to main content

Generate ancestor (genealogy) chart

Project description

life_line_chart

Generate ancestor and descendants (genealogy) chart. SVG export is supported.

Getting started

Install the module and the requiredments. Open a gedcom file and generate a ancestor life line chart.

Prerequisites

You will need a gedcom file. You can use the automatically generated one from the tests directory in this repository ([tests/autogenerated.ged]).

from life_line_chart import DescendantGraph, AncestorGraph, get_gedcom_instance_container
individual_id = '@I249@'
graph = AncestorGraph(
    instance_container=lambda: get_gedcom_instance_container(
        'tests/autogenerated.ged'),
    formatting={'total_height': 800, 'vertical_step_size':20}
)
graph.set_chart_configuration({'root_individuals': [
    {'individual_id': individual_id, 'generations': 8}
]})
graph.update_chart()
graph.paint_and_save(individual_id, 'example_1.svg')


individual_id = '@I2@'
graph = DescendantGraph(
    instance_container=lambda: get_gedcom_instance_container(
        'tests/autogenerated.ged'),
    formatting={
        'total_height': 800,
        'vertical_step_size':50,
        'relative_line_thickness':0.3}
)
graph.set_chart_configuration({'root_individuals': [
    {'individual_id': individual_id, 'generations': 2}
]})
graph.update_chart()
graph.paint_and_save(individual_id, 'example_2.svg')

example_1.svg example_2.svg

Installing

requirements.txt

Then you will need the following modules:

  • svgwrite (i.e. pyparsing)
  • cmath
  • pillow (for tests with photos)
pip install -r requirements.txt

Building

python setup.py bdist_wheel

Automatically generating example gedcom files requires the module

  • names

Building a wheel requires with setup.py requires:

  • shutil
  • glob
  • setuptools
  • distutils
  • wheel

License

This project is licensed under the MIT License - see the LICENSE file for details

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

life_line_chart-1.3.1.tar.gz (43.4 kB view details)

Uploaded Source

Built Distribution

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

life_line_chart-1.3.1-py3-none-any.whl (65.5 kB view details)

Uploaded Python 3

File details

Details for the file life_line_chart-1.3.1.tar.gz.

File metadata

  • Download URL: life_line_chart-1.3.1.tar.gz
  • Upload date:
  • Size: 43.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for life_line_chart-1.3.1.tar.gz
Algorithm Hash digest
SHA256 3b0d3151682aab3b306ffb64c0b718e5966e2adcb57953bc7b6f086d62e1746d
MD5 3d783684d58d2fa853c2062b2b693013
BLAKE2b-256 2ee76c091661996b7a2a2d2246c564b80f1f77013090996d22c3ed0b5d105b38

See more details on using hashes here.

File details

Details for the file life_line_chart-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: life_line_chart-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 65.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3

File hashes

Hashes for life_line_chart-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f6e79fa4996d0f79017cfe99adbe50659f2222f1f94e8209491ccb380945edce
MD5 86fca6daab38ea9e2a1905575e928638
BLAKE2b-256 86ebe1ce6afb47bf3d5fe3018f9cff557a5bbe20ca46057d462547d278fcc3d0

See more details on using hashes here.

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