GithubHelp home page GithubHelp logo

csv_to_gedcomx's Introduction

This is a simple python script that can convert two CSV tables to a GedcomX json file.

Basic usage

Example:

# put result in new file named output.json
main.py persons.csv families.csv --output output.json
# print result to stdout
main.py persons.csv families.csv
# only include relatives of the person with id 42
main.py person.csv families.csv --id 42

Replace the file names with your own. When you specify an id, only the following people will be included in the output:

  • descendants and ancestors
  • partners and siblings
  • descendants of siblings

Structure of the CSV files

Person table

id title surname middle_name born married nickname aka full_name gender child_of birth_date birth_place death_date death_place death_cause occupation religion notes
0 unknown Unknown reserved
1 Prof. John Doe Jonny John Doe Male +1919-01-09 Dirmingcan +2010-10-10 Brolin professional describer flying spaghetti monster cause of death missing
2 Miriam Alex Smith Doe Miriam Doe Female +1902-02-02 Ohoho +2003-03-03 Brolin heart attack example giver
3 Doe Kim Doe Intersex 0 +2001-02-01T06-08-02 Brolin

Notes:

  • The ID 0 is reserved️ for the unknown person. It can be used in families with unknown partners. Anything specified for that ID will be ignored.
  • IDs can be any string (except for 0). They are directly used in the resulting GedcomX file
  • full_name is the name the person normally is called
  • gender can be Male, Female, Unknown or Intersex
  • dates are formatted as specified here
  • child_of specifies the family id that this person is a child of. It must be included in the family table
  • notes are seperated by semicolon

Family table

id partner1 partner2 date place notes
0 1 0 +1940-04 Brolin family of Kim
1 2 0 +1920 since partner2 is 0, a new person will be generated
  • ID can be any string, 0 is not reserved
  • partner1 and partner2 are IDs of persons specified in the person table
  • date is the date of the marriage, place is the place of the marriage
  • notes are seperated by semicolon

csv_to_gedcomx's People

Contributors

l0drex avatar

Watchers

 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.