Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python interface modules? #139

Open
nealmcb opened this issue Feb 17, 2012 · 19 comments
Open

Python interface modules? #139

nealmcb opened this issue Feb 17, 2012 · 19 comments

Comments

@nealmcb
Copy link

nealmcb commented Feb 17, 2012

GEDCOM X is using your Enunciate tools to automatically build client libraries for various langues directly from the Java project. Pretty cool!

http://www.gedcomx.org/model/code.html

But Python client code is not currently being generated. Python would be great for many users, as well as the Gramps open-source genealogy program.

It looks like there is a relevant Enunciate issue open calling for python support:

http://jira.codehaus.org/browse/ENUNCIATE-246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#issue-tabs

What would it take to support Python?

@EssyGreen
Copy link

If we're down to that level of detail, can you generate a .Net version too :P

@nealmcb
Copy link
Author

nealmcb commented Feb 17, 2012

Sarah, check out the link. Its already got .NET, as well as C, Java, Java JSON, Objective C, and Ruby JSON.

@EssyGreen
Copy link

Ooh looks like it's been updated! Thanks for nudging me :)

@EssyGreen
Copy link

@stoicflame - are the links on http://www.gedcomx.org/model/code.html being updated in sync with the java ones?

@stoicflame
Copy link
Member

are the links on http://www.gedcomx.org/model/code.html being updated in sync with the java ones?

Yes. Although they're really raw ATM. E.g. see #116.

I love the idea of python support.

@EssyGreen
Copy link

@stoicflame - many thanks - no problem with the raw-ness :)

@jralls
Copy link
Contributor

jralls commented Feb 18, 2012

I love the idea of python support.

Me too, though I'm not all that impressed with enunciate's C or Objective-C output.

Why, BTW, did you do C instead of C++? Without an object-oriented framework (and I spend way too much time with GObject to wish that on anyone) the impedance mismatch with java is going to make it very hard to translate from java.

@stoicflame
Copy link
Member

Without an object-oriented framework (and I spend way too much time with GObject to wish that on anyone) the impedance mismatch with java is going to make it very hard to translate from java.

Indeed.

Why, BTW, did you do C instead of C++?

It was pretty much an arbitrary decision. I guess I thought that targeting C would accommodate both C and C++. "Two birds, one stone" type of reasoning.

@jralls
Copy link
Contributor

jralls commented Feb 22, 2012

It was pretty much an arbitrary decision. I guess I thought that targeting C would accommodate both C and C++. "Two birds, one stone" type of reasoning.

Well, that's almost an argument for using GObject, which has a neat tool called GObject Introspection which makes it pretty easy to write other language bindings.

Another way to go would be to output C++ and apply SWIG to get other languages. C++ can be made interoperable with C, you just have to write wrapper functions. We use SWIG in Gnucash to wrap our C core for Guile and Python bindings. It works very well.

In the same vein, C or C++ bindings cover Objective-C. I routinely mix Objective-C into C to add Mac functionality to Gnucash, and we mix them extensively in Gtk's quartz backend.

I think the best result will come from hand-implementing in C++ in parallel to java. This Stacktrace thread doesn't offer much hope of getting a good result automatically.

@jralls
Copy link
Contributor

jralls commented Feb 22, 2012

I should mention that SWIG and GObject Introspection don't translate, they wrap. The implementation remains in the original C or C++ library, and is called by generated functions in the target languages.

@sam-m888
Copy link

sam-m888 commented Nov 4, 2014

Renamed to
https://github.com/elderamevans/familysearch-python-sdk-opensource

Was
github . com/elderamevans/familysearch-python-sdk-unofficial

@chrisworley
Copy link

Here's a first crack at a Python library:
https://github.com/chrisworley/gedcomx-python

@stoicflame
Copy link
Member

Wow! That's awesome, @chrisworley. I look forward to having some more time to look closely, but I'm liking what I'm seeing so far.

@eljeffeg
Copy link

Looking for a JavaScript library that could read gedcomx and allow me to query various genealogical information from it.

@mmealling
Copy link

Such a thing doesn't currently exist as far as I can tell. I'm working on one off and on but nothing usable yet.

@stoicflame
Copy link
Member

Do you guys want me to open a gedcomx-js repository? I'd be happy to add you as contributors so you can collaborate...

@eljeffeg
Copy link

I'd like to help, but I don't have much experience with gedcomx or the existing API structures. Essentially, I was just looking for something to read gedcomx and where I could make queries like getBirth(), getDeath(), getBurial(), getName(), which returns something like {"birth": ["date": "7 Jan, 1880", "location": "Paris, France"]} or {"name": "Steve Smith", "first": "Steve", "last": "Smith"}. I expect you probably already have some time of standardized returns across the APIs for this type of thing? I also don't quite understand some of the things in gedcomx, such as "PR_NAME_ORIG" vs "PR_NAME". So, my intended use is limited, but I'd be happy to help to the point where it does what I need. I was thinking I would just try to load the JSON as a JS object and try to parse it out.

@stoicflame
Copy link
Member

I also don't quite understand some of the things in gedcomx, such as "PR_NAME_ORIG" vs "PR_NAME".

FYI, that's not GEDCOM X. Those are just field names.

I was just looking for something to read gedcomx and where I could make queries like getBirth(), getDeath(), getBurial(), getName(), which returns something like {"birth": ["date": "7 Jan, 1880", "location": "Paris, France"]} or {"name": "Steve Smith", "first": "Steve", "last": "Smith"}.

Are you talking about standardization services? Pass in text and get back structured data?

@eljeffeg
Copy link

Yes - perhaps
I would say that gedcomx is structured data, but I'd like a way to easily query it with JavaScript. So ya, I'd like to feed it a gedcomx json string, like this and be able to easily read the elements, like name, birth date, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants