Code Monkey home page Code Monkey logo

family-tree's Introduction

A simple family tree visualizer

Demo

https://daveagp.github.io/family-tree/index.html

How to use

  • Create family.txt for your family
  • Put any photos into the photos directory
  • Change the first few lines of family.js

Format of your family.txt file

This file will contain

  • entries for couples, including their list of offspring
  • optionally, entries for individuals, including their lifespan and photo

Entries for couples are formatted like this:

Name One + Name Two
c: Child A, Child B, Child C
n: Notes line(s), optional

If there are no children or no notes, leave those lines out.

Entries for individuals can contain a lifespan, photo, and notes.

Name Of Person
l: 1912-Dec 2100
p: photo_filename.jpg
n: Notes line(s), optional

All lines are optional, and if you have no lines, you need not fill out an entry for someone. Lifespans can be of the forms start-end, start- or -end.

Here's a simple example file with 2 entries (one couple, one person) and 5 people total:

Homer Simpson + Marge Bouvier
c: Lisa Simpson, Bart Simpson, Maggie Simpson
n: Married while pregnant with Lisa
Homer Simpson
l: 1951-
p: homer.jpg
n: Nuclear Safety Inspector in Sector 7G

UI

  • The bar at top allows switching the level of detail shown
  • Click on a person to make them the root of the tree
  • Hover over a person to show all notes for them and their partners

Data Tricks

  • You can leave someone's name as ? if you don't know it. (Should be a parent or child's name in a couple's entry.)
  • Put comments in your family.txt by starting them with #
  • Multiple people with the same name can be disambiguated by putting a # after their name, followed by a distinct identifier (which will not be rendered). Example:
King George#Older + Mary of Teck
c: King George#Younger
  • http/s URLs in n: notes lines automatically are turned into links. They can't contain spaces.

Data Limitations

  • This program can only handle topological trees, not marrying extended family or two marriages between families
  • Names shouldn't contain commas
  • If person X has two spouses, you need to list them as the first person in one couple and the second person in the other. E.g. Partner1 + X and X + Partner2. This is because the rendering engine uses the order in each couple as literal positional instructions
  • This program can't handle someone who has had more than two spouses/partners

Disclaimer

Use your judgment when posting sensitive family information on the internet, e.g. you may consider using .htaccess or some other appropriate security.

Etc

family-tree's People

Contributors

daveagp avatar escuita avatar pablogalve avatar

Watchers

 avatar  avatar

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.