-
Notifications
You must be signed in to change notification settings - Fork 67
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
Comments
If we're down to that level of detail, can you generate a .Net version too :P |
Sarah, check out the link. Its already got .NET, as well as C, Java, Java JSON, Objective C, and Ruby JSON. |
Ooh looks like it's been updated! Thanks for nudging me :) |
@stoicflame - 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. |
@stoicflame - many thanks - no problem with the raw-ness :) |
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. |
Indeed.
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. |
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. |
Renamed to Was |
Here's a first crack at a Python library: |
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. |
Looking for a JavaScript library that could read gedcomx and allow me to query various genealogical information from it. |
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. |
Do you guys want me to open a |
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. |
FYI, that's not GEDCOM X. Those are just field names.
Are you talking about standardization services? Pass in text and get back structured data? |
Yes - perhaps |
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?
The text was updated successfully, but these errors were encountered: