FamilySearch/gedcom5-java

PATCH: Example tool to create GraphViz (dot) graph from GEDCOM model

domseichter opened this issue · 0 comments

Hi,

Please find attached a patch, which adds a simple tool to create a GraphViz (dot) file from a GEDCOM model to visualize a family tree starting from a root person.

Usage:

  1. List all persons in the model to get a root ID
    mvn exec:java -Dexec.mainClass=org.folg.gedcom.tools.Gedcom2Dot -Dexec.args="-i src/test/resources/Muster_GEDCOM_UTF-8.ged --list"

  2. Create a DOT file
    mvn exec:java -Dexec.mainClass=org.folg.gedcom.tools.Gedcom2Dot -Dexec.args="-i src/test/resources/Muster_GEDCOM_UTF-8.ged -o example.dot -r I1"

  3. Visualize using GraphViz
    dot -Tpdf -o example.pdf example.dot

See attached patch and examples:
Gedcom2Dot.patch.txt
example.pdf
example.dot.txt

I think this a useful tool and showcase. Let me know of feedback or if you want to provide a pull request.