Coder Social home page Coder Social logo

vorburger / kingraph Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rstacruz/kingraph

7.0 3.0 2.0 1.1 MB

Plots family trees using JavaScript and Graphviz

License: MIT License

JavaScript 82.39% Makefile 12.98% Python 3.31% Dockerfile 1.33%
family-tree genealogical-trees genealogy graphviz plain-text plaintext yaml

kingraph's Introduction

kingraph

License: MIT Code Climate contributions welcome

👪 Plots family trees using JavaScript and Graphviz

A family tree plotter with a very simple syntax. It probably doesn't cover everything bigger tools do, but covers 90% of it for the sake of simplicity.

Example Graph

Getting started

A family tree is a YAML file. To get started, store the following text in a file called family.yaml:

families:
  - parents: [Marge, Homer]
    children: [Bart, Lisa, Maggie]
  - parents: [Lisa, Milhouse]
    children: [Zia]

people:
  Marge:
    fullname: Marjorie Bouvier Simpson

Use kingraph via this project's Docker Container image to transform this YAML into a Graphviz DOT file, and then that into a SVG and PDF:

docker run --rm -v $(pwd):/data --pull=always ghcr.io/vorburger/kingraph:latest --format=dot family.yaml >family.dot
dot -Tsvg -o family.svg family.dot
open family.svg
dot -Tpdf -o family.pdf family.dot
open family.pdf

You can also try to generate a SVG with kingraph directly by using --format=svg, but you'll likely run into memory issues.

Further Examples

Spoiler alerts, view at your own risk :)

Simpsons (simple)

Source: simpsons.yaml

Simpsons Example

Modern Family (simple with houses)

Source: modernfamily.yaml

Modern Family Example

Harry Potter (larger tree)

Source: potter.yaml

Potter Example

Game of Thrones (overly complicated)

Source: got.yaml

GOT Example

Documentation

For further reading:

Develop

As per the Dockerfile, you need Node.js, and then in order to locally hack on this code, just do:

npm install
bin/kingraph

To try out the Docker build locally:

docker build -t kingraph .
docker run ... kingraph ... # instead of ghcr.io/vorburger/kingraph:latest

Thanks

Authored and initially maintained by Rico Sta. Cruz with help from contributors (list).

ricostacruz.com  ·  GitHub @rstacruz  ·  Twitter @rstacruz

kingraph's People

Contributors

rstacruz avatar alexanderwillner avatar vorburger avatar constantinmaes avatar dependabot[bot] avatar elenawinters avatar vabene1111 avatar m-arcus avatar marekkalnik avatar raisedadead avatar

Stargazers

Folajimi Adekoya avatar Smit avatar V;ad avatar Slava Semushin avatar Abe Burnett avatar Sven Bachmann avatar Costin Grigore avatar

Watchers

James Cloos avatar Folajimi Adekoya avatar  avatar

Forkers

kyuhyoung smit-io

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.