Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
domseichter opened this issue Sep 10, 2021 · 0 comments
Open

Comments

@domseichter
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant