npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

genealogit

v1.2.3

Published

genealogit ==========

Downloads

22

Readme

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 <[email protected]>.

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.