A family tree is a YAML file. Start with a families
collection. Every family can have parents
and children
.
+families:
+ - parents: [Marge, Homer]
+ children: [Bart, Lisa, Maggie]
kingraph can give you svg
(default), png
or dot
files.
kingraph family.yml > family.svg
kingraph family.yml -F png > family.png
kingraph family.yml -F dot > family.dot
To define their full names, add a people
collection. This is optional—people will still be in the family tree even if they don't have a people
record.
families:
- parents: [Marge, Homer]
children: [Bart, Lisa, Maggie]
+people:
+ Marge:
+ fullname: Marjorie Bouvier Simpson
To create second generations, you can simply add another record to families
.
families:
- parents: [Marge, Homer]
children: [Bart, Lisa, Maggie]
+ - parents: [Lisa, Milhouse]
+ children: [Zia]
Turn a family into a house by adding a house
name. They will show up grouped in a box.
families:
+ - house: Stark
parents: [Ned, Catelyn]
children: [Arya, Rickon, Bran, Sansa, Rob]
+ - house: Lannister
parents: [Tywin, Joanna]
children: [Cersei, Jaime, Tyrion]
To add families into a house, nest the families.
families:
- house: Simpson
parents: [Marge, Homer]
children: [Bart, Lisa, Maggie]
+ families:
+ - parents: [Lisa, Milhouse]
+ children: [Zia]
*Why nest?*
Families can be placed as sub-families of another families. This is more of a visual designation rather than a semantic one. If the parent family is a "house", then the sub-families will show up in the same house.
It also helps to untangle your YAML file.
See advanced usage for more features.