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

[Feature request] documentation/example for print_gedcom and save_gedcom #59

Open
dianekaplan opened this issue Jan 2, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@dianekaplan
Copy link

Is your feature request related to a problem? Please describe.
I'm SO HAPPY to have found gedcom.parser! I'm making a family tree in Django with the idea of having a gedcom file be the source of truth, so I can periodically re-import the updated file to my family tree and to the other programs where I have trees. This has been great for parsing, so that part is all set. But in order for my master plan to work, I have a script to generate unique ids for each person and I want to also be able to write out an updated gedcom file with the unique ids added in one of the tags (maybe @alia@ maybe something else).

I'm starting to play around with print_gedcom and save_gedcom and it sounds like they only take one argument (self)- and I'm not getting it to output successfully yet. Do you have a usage example?

Describe the solution you'd like
A usage example added to documentation for print_gedcom and save_gedcom.

Describe alternatives you've considered
So far I'm just trying things :)

@dianekaplan dianekaplan added the enhancement New feature or request label Jan 2, 2021
@gareth-lloyd
Copy link

I expect I'm too late to be of much use to you, but I've just been playing around with this library and hit the same problem.

It's broken on version v1.0.0, but installing v2.0.0-dev3 fixed the issue.

The relevant change was in the code of gedcom/element/element.py, in the to_gedcom_string method of the Element class. Instead of returning early if the "level" of the node was less than 0 (which is true for the root node), the updated code carries on and outputs recusively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants