Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

genealogit

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

genealogit

genealogit ==========

  • 1.2.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

genealogit

GitHub release (latest by date) NPM version

What's this?

genealogit uses Git as a family tree modelling and visualization tool.

genealogit build <file> reads data from a file and for each person creates a single-commit branch.

genealogit visualize <file> shows the git log --graph for the branches (must run genealogit build <file> first).

genealogit relationship <file> <individual 1's id> <individual 2's id> reports the blood relationship between two individuals (must run genealogit build <file> first).

genealogit clean <file> deletes the branches created by genealogit build <file>.

The data file can be GEDCOM (.ged), JSON, or YAML. If making your own .json or .yaml, you can follow GEDCOM or take advantage of genealogit's support for the non-standard properties name and parentIds. For example, a simple YAML could look like

- individuals
  - id: 1
    name: child
    parentIds:
      - 2
      - 3
  - id: 2
    name: parent_1
  - id: 3
    name: parent_2

Branch names are

genealogit/<file>/<individual id>

Commit messages are

<individual's full name> (<individual's id>)

<individual's full record>

The commit author for all commits created by genealogit is genealogit <genealogit@olets.dev>.

It's all just Git, so you can do anything you would in any Git repo

  • See a person's full record with, for example, git log -1 genealogit/<file>/<id>.

  • See the line of relation between two people with, for example,

    git log --oneline genealogit/<file>/<ancestor's id>..genealogit/<file>/<descendant's id>
    
  • Operate on all branches built from a file by, for example, leveraging git for-each-ref. For example push a family tree with

    for branch in $(git for-each-ref --format='%(refname:short)' refs/heads/genealogit/<file>); do git push -u <upstream> $branch; done
    

Quickstart

At a minimum, genealogit requires that you are in a Git repo with at least one commit. You Git repo can have a lot of other things going on too. Install genealogit as an Node package dependency. The minimum setup is:

mkdir my-family-tree
cd my-family-tree
git init
git commit --allow-empty -m "empty"
(yarn init | npm init)
(yarn add genealogit | npm install genealogit)

Add a family tree file to the directory. If you don't have one, download and play with one or all of the files in demo/ directory. (Or download others at for example https://webtreeprint.com/tp_famous_gedcoms.php). The following supposes a GEDCOM file. If the file is JSON use build --format=json in the build. If the file is YAML build --format=yaml.

(npx | yarn) genealogit build a-family-tree.ged
(npx | yarn) genealogit visualize a-family-tree.ged
(npx | yarn) genealogit relationship a-family-tree.ged <an id> <another id>

 

The following "usage" and "commands" documentation is generated by oclif. Importantly, do not follow their suggestion of installing globally — that is not currently supported.

Usage

$ npm install -g genealogit
$ genealogit COMMAND
running command...
$ genealogit (-v|--version|version)
genealogit/1.2.3 darwin-x64 node-v12.16.3
$ genealogit --help [COMMAND]
USAGE
  $ genealogit COMMAND
...

Commands

genealogit build [FILE]

Build a family tree in Git from a GEDCOM file

USAGE
  $ genealogit build [FILE]

OPTIONS
  -v, --verbose
  --format=format  [default: gedcom]

See code: src/commands/build.ts

genealogit clean [FILE]

Delete a tree created by build

USAGE
  $ genealogit clean [FILE]

OPTIONS
  --format=format  [default: gedcom]

See code: src/commands/clean.ts

genealogit help [COMMAND]

display help for genealogit

USAGE
  $ genealogit help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

genealogit relationship [FILE] [IND1] [IND2]

Show the relationship between two individuals

USAGE
  $ genealogit relationship [FILE] [IND1] [IND2]

See code: src/commands/relationship.ts

genealogit visualize [FILE]

Show the Git log graph for the specified file

USAGE
  $ genealogit visualize [FILE]

See code: src/commands/visualize.ts

Acknowledgments

genealogit relies on gedcom-js to parse GEDCOM. That project is also the source of the potter.ged demo file.

You may be interested in the related exploration GenealogyTreeInGit, which is written up at https://habr.com/en/post/465959/.

Contributing

Thanks for your interest. Contributions are welcome!

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Check the Issues to see if your topic has been discussed before or if it is being worked on. Discussing in an Issue before opening a Pull Request means future contributors only have to search in one place.

This project loosely follows the Angular commit message conventions.

License

This project is licensed under the MIT license. For the full text of the license, see the LICENSE file.

Keywords

FAQs

Package last updated on 23 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc