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 DescendantChart, AncestorChart
from life_line_chart.GedcomInstanceContainer import get_gedcom_instance_container
individual_id = '@I249@'
chart = AncestorChart(
    instance_container=get_gedcom_instance_container(
        'tests/autogenerated.ged'),
    formatting={'total_height': 800, 'horizontal_step_size':20}
)
chart.set_chart_configuration({'root_individuals': [
    {'individual_id': individual_id, 'generations': 8}
]})
chart.update_chart()
chart.paint_and_save('example_1.svg')


individual_id = '@I2@'
chart = DescendantChart(
    instance_container=get_gedcom_instance_container(
        'tests/autogenerated.ged'),
    formatting={
        'total_height': 400,
        'horizontal_step_size':70,
        'relative_line_thickness':0.2}
)
chart.set_chart_configuration({'root_individuals': [
    {'individual_id': individual_id, 'generations': 2}
]})
chart.update_chart()
chart.paint_and_save('example_2.svg')


individual_id = '@I2@'
chart = DescendantChart(
    instance_container=get_gedcom_instance_container(
        'tests/autogenerated.ged'),
    positioning={
        'chart_layout': 'cactus'
    },
    formatting={
        'total_height': 400,
        'birth_label_active': False,
        'death_label_letter_y_offset': -3,
        'line_weighting': 'number_of_descendants',
        'horizontal_step_size':70,
        'relative_line_thickness':0.2}
)
chart.set_chart_configuration({'root_individuals': [
    {'individual_id': individual_id, 'generations': 3}
]})
chart.update_chart()
chart.paint_and_save('example_3.svg')

example_1.svg example_2.svg example_3.svg

Installing

requirements.txt

Then you will need the following modules:

  • svgwrite (i.e. pyparsing)
  • 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.6.0.tar.gz (75.1 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.6.0-py3-none-any.whl (102.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: life_line_chart-1.6.0.tar.gz
  • Upload date:
  • Size: 75.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for life_line_chart-1.6.0.tar.gz
Algorithm Hash digest
SHA256 d6673547e3f997c893b53f83a8668dbcd3331dbd54725b0beee7e19e62c3cc48
MD5 afa960301cf9be982894f723bdcf10dd
BLAKE2b-256 eaa9dab9d2ea5d96cdc2830520ed4178cf63385c6b79d8f84294efd4daf8eeb9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: life_line_chart-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 102.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for life_line_chart-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1891c23525688cfab360a202fc1d5af003e37317aa75f4bfe32ac6160bea8c43
MD5 d4f39e54e9ffc7ffa317e88e5f0707c4
BLAKE2b-256 05825e431cb68ac19ea78b8d453bd63e5916586d17c9c7462c6472447814da7b

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