Skip to content
/ ged2svg Public

This tool takes a file in the GEDCOM format produced by a genealogic software and generates a family tree in the Scalable Vector Graphic format suitable for later editing and printing.

License

Notifications You must be signed in to change notification settings

bver/ged2svg

Repository files navigation

Rendering GED files as family trees

This tool takes a file in the GEDCOM format produced by a genealogy software and generates a family tree in the Scalable Vector Graphic format suitable for later editing and printing.

The repository also includes utilities for consistency checking and finding persons in the GEDCOM file.

Installation

Tools are written in Ruby and have only one dependency -- Jim Weirich's builder gem.

Simply clone this repo and:

cd ged2svg
bundle install

ged2svg.rb Usage

Since rich family trees are hard to render some pruning trade-ofs were necessary. Therefore the 'trunk' of the family tree should be provided together with filenames:

./ged2svg.rb  '@I500339@'  '@I500005@'  family.ged  output.svg

Arguments are:

  1. Reference to the root individual who is the oldest ancestor to render (mandatory).
  2. Reference to the central individual who is the ancestor of generations fully rendered (optional).
  3. Path to the input family records file in the GEDCOM format (mandatory).
  4. Path to the output family tree file in the SVG format (mandatory).

References (INDI identifiers) are used in the GEDCOM file to uniquelly adress records of particular individual.

If the GED file contains branches to non-root ancestors some individual records are pruned. The individual is rendered if he/she is the partner or the direct descendant of the root individual, recursively. It means that partner's ancestors or children of the partner from other families are not rendered.

If the central individual reference is missing the family tree is fully rendered from the root ancestor to the youngest ones (tree leafs).

When the central individual is specified by it's reference (who has to be the direct descendant of the root individual) than rendering of generations between root and central individuals is simplified. It means that families between root and central individuals are rendered but other families between them are hinted showing only siblings and their partners.

It is likely the resultant output.svg file will have to be post-processed. Try to un-group the tree repeatedly in your graphics editor.

Limitations & Possible future improvements

  • SVG outputs are tested only in Inkscape.
  • Only given names, surnames, birth and death dates are rendered in individual's box.
  • Dates are in the DD.MM.YYYY format only.
  • SVG formatting styles (CSS) information are hardcoded in constants in the beginning of the render_tree.rb source file.
  • More than two spouses are not supported.
  • Full render mode produces big gaps since the recursive nature of the rendering algorithm. The best solution is to extend it to use the space allocation memories and/or shuffling heuristics. The current implementation is the balanced trade-of between the result tree quality and simplicity.
  • Parsing the complex (and pretty outdated) GEDCOM format is somehow hacked rather than painfully engineered. Some edge cases might not be parsed correctly.

Utilities

Finding the specific person in the large GEDCOM file could be difficult. The find_person utility search through the GEDCOM file and reports details for all persons matching the query.

The query can be the substring of person's GivenName, Surname or GivenName Surname:

./find_person.rb  family.ged  'Pavel S'

or the INDI reference:

./find_person.rb  family.ged  I500339

Uncertainty is frequent in deep genealogy research. GEDCOM files may contain wrong records, dates or relations. Therefore finding inconsistencies is desirable before printing the family tree. The check_ged utility checks and reports if:

  • the birth date is later than the death date
  • the child was born before parent's birth date
  • the child was born after parent's date of death (might be possible in reality)
  • the marriage date comes before person's date of birth
  • the marriage date comes after the person's death
  • more siblings with the same given name (might be possible)
  • the parent too old when the child was born (warning)
./check_ged.rb  family.ged

License

(c) 2017-2021 Pavel Suchmann under GNU v3.

Please help to break the walls of genealogy data gardens.

About

This tool takes a file in the GEDCOM format produced by a genealogic software and generates a family tree in the Scalable Vector Graphic format suitable for later editing and printing.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages