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')
Installing
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
Release files for life-line-chart 1.7.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| life_line_chart-1.7.7.tar.gz | 94.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| life_line_chart-1.7.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 202.1 kB
Release files / life_line_chart-1.7.7.tar.gz
| Download URL | life_line_chart-1.7.7.tar.gz |
|---|---|
| Size | 94.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
856f4250b680825ac79c9f49cb7abac08cf482eaf558031a7ef18d990d9ce707
|
|
BLAKE2b-256 checksum How to use checksums |
f1e7369c611b5bdbac00631a88af97f1e02078e8c3364fdd78fdb8e48b26fb96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|
Release files / life_line_chart-1.7.7-py3-none-any.whl
| Download URL | life_line_chart-1.7.7-py3-none-any.whl |
|---|---|
| Size | 107.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1ec32eb22f54b261725569106ecc835090fefe6a96cad2c966a835f608608497
|
|
BLAKE2b-256 checksum How to use checksums |
4a2090d368bd8f9c9ab4a54855ed72a036cd0d5359ffc98ec689ec7c50772474
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
|