tmcw / gedcom

A simple GEDCOM parser that focuses on translating GEDCOM structure into JSON.
https://tmcw.github.io/parse-gedcom/live/
ISC License
159 stars 31 forks source link

Rewrite / restructure to align with GEDCOM spec from the ground up #19

Closed tmcw closed 3 years ago

arxpoetica commented 5 years ago

Hey @tmcw I just realized you're the owner of this lib. I've been looking for something that will parse GEDCOM, but there's not a lot of Node.js / YavaScript options out there. a) what's the status on this particular project, b) how will you respond to pull requests if I do some work to update the library, anc c) etc.?

I have a potential use case for parsing GEDCOM.

Thanks!

tmcw commented 5 years ago

The ground-up rewrite is in progress at https://beta.observablehq.com/@tmcw/parse-gedcom . Because I have a use for it, this project will likely live on for quite a while. The biggest hurdle right now, though, is deciding whether to make the output of the library into GEDCOM-X JSON representations, which I think would be ideal but would be a whole lot of work, or whether to implement a standardized parser but keep an ad-hoc serialization format.

That said, the library as it stands in this repo still works pretty okay for most cases.

PRs: I'll create a v2 branch with the code I've been developing on Observable so that they don't get clobbered.

arxpoetica commented 5 years ago

Should we take that conversation offline about data standards and genealogy data, or is this the best place? I have loads of opinions about that, welled up over yeeears of thinking about it (and also at one point pursuing but later shelving a data standardization company).

tmcw commented 5 years ago

I think the calculus is pretty straightforward; I'm in favor of GEDCOM-X, but it's a matter of whether I'll have the time to implement it, and more importantly, the continuing time to maintain the more complex code it'll require. This being a project mainly made to scratch a personal itch (as the best personal oss projects are), GEDCOM-X doesn't seem like a crucial feature because it's barely supported elsewhere afaict.

arxpoetica commented 5 years ago

https://xkcd.com/927/

stivaugoin commented 5 years ago

Hey guys, last year I wrote a small lib thats uses this one with a "more friendly" output. https://github.com/stivaugoin/gedcom-js

I am currently rewriting it in Typescript. It's not perfect and complete, I only export events type I need.

I like your approch for your new version. If you need help or advice let me know.

tmcw commented 3 years ago

The main branch now has this work landed in it. There's plenty more that I'll ticket out, but the gist is: it implements the spec more thoroughly and literally. It emits a unist-compatible AST format that isn't GEDCOM-X, but could be converted to gedcom-x. I'd really happily accept a PR implementing gedcom-x support - this isn't an attempt to invent a standard - just intended to be a simple, generally usable format. Also implemented d3 force layout, json, graphlib, and dot export formats.