-
Notifications
You must be signed in to change notification settings - Fork 9
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
Documentation on generating GEDCOM files #5
Comments
File.open( "../test_data/TGC551LF.out", "w:ASCII-8BIT") do |file| |
Wrote it with the intent to create a web based gedcom editor. Got side tracked by life :) I do use it to read gedcom files, to use in www.burrowes.org to load and present my Family tree. Others have extended it to be an editor too, so look at their forks. Also good for checking gedcom files syntax and all references are consistent. ["burrowes.ged"].each do |source| ` |
Thanks for the note!
…On Sun, Sep 13, 2020 at 3:22 PM Rob Burrowes ***@***.***> wrote:
Wrote it with the intent to create a web based gedcom editor. Got side
tracked by life :) I do use it to read gedcom files, to use in
www.burrowes.org to load and present my Family tree. Others have extended
it to be an editor too, so look at their forks.
Also good for checking gedcom files syntax and all references are
consistent.
`
require 'gedcom'
["burrowes.ged"].each do |source|
puts "parse #{source}"
g = Gedcom.file(*dir* + '/' + source, "r:ASCII-8BIT") #OK with LF line
endings.
g.transmissions[0].summary
puts
puts "Self check of Gedcom consistency"
g.transmissions[0].self_check #validate the gedcom file just loaded,
printing errors found.
puts
end
`
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2DVLSIHC7QWTS22MSLUV3SFUSW3ANCNFSM4RKXNDIA>
.
|
Hello, I have just discovered your gem when trying to generate a GEDCOM file from some Excel file my family created when starting to create the family tree. From the above discussion, I could not understand if the current code is actually able to generate GEDCOM "from scratch". So my questions are:
thank you in advance for your help. Fred Note:I tried the naive approach : require 'gedcom'
g = Gedcom.new
transmission = Transmission.new
g.transmissions = [ transmission ]
name_record = Name_record.new(transmission)
name_record.surname = "Garzon"
name_record.given = "Frederic"
ind = Individual_record.new(transmission)
ind.name_record = [ name_record ]
transmission.individual_record = [ ind ]
puts g.transmissions[0].to_gedcom
puts g.transmissions[0].self_check The first The second puts raise an exception:
The nil object is the Individual_record#@individual_ref attribute. I have not looked into the entire source code yet but I guess I need an Xref for each record I create... |
Hi @rbur004 ,
This looks like an awesome library! I know it's been years since you've looked at it. The Readme states you can both parse and produce GEDCOM files, but I can't find any references in the documentation for how to produce GEDCOM files.
Thanks!
Matt
The text was updated successfully, but these errors were encountered: