Command usage

72 views
Skip to first unread message

Thomas Daly

unread,
Sep 2, 2013, 9:52:05 AM9/2/13
to folg-...@googlegroups.com
Hello,

Thank you for this project.

I would like to use the tools to convert a GEDCOM file to JSON.

I understand that the command I need is

mvn exec:java -Dexec.mainClass=org.folg.gedcom.tools.Gedcom2Json.java -Dexec.args="<args>"

Please could you document what the available arguments are (to replace <args> above)?

Many thanks.

Thomas Daly

unread,
Sep 5, 2013, 6:46:42 AM9/5/13
to folg-...@googlegroups.com
I tried guessing what the arguments might be.  The response is below.  It's a shame the documentation is so poor, as it makes the software unusable.

admin@bramber:~/Gedcom-master$ mvn exec:java -Dexec.mainClass=org.folg.gedcom.tools.Gedcom2Json.java -Dexec.args="-i /home/admin/Gedcom-master/rackman.ged -o /home/admin/Gedcom-master/rackman.json"
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'exec'.
[INFO] ------------------------------------------------------------------------
[INFO] Building gedcom
[INFO]    task-segment: [exec:java]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing exec:java
[INFO] No goals needed for project - skipping
[INFO] [exec:java {execution: default-cli}]
[WARNING]
java.lang.ClassNotFoundException: org.folg.gedcom.tools.Gedcom2Json.java
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
        at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:285)
        at java.lang.Thread.run(Thread.java:679)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An exception occured while executing the Java class. org.folg.gedcom.tools.Gedcom2Json.java

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6 seconds
[INFO] Finished at: Thu Sep 05 11:43:35 BST 2013
[INFO] Final Memory: 7M/18M
[INFO] ------------------------------------------------------------------------
admin@bramber:~/Gedcom-master$                                

Dallan Quass

unread,
Sep 5, 2013, 10:53:24 PM9/5/13
to folg-...@googlegroups.com
I've been out of town this week and haven't had a chance to look into your question. I'm getting back tonight and will update the documentation tomorrow.

Dallan

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "folg gedcom" group.
To unsubscribe from this group and stop receiving emails from it, send an email to folg-gedcom...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Dallan Quass

unread,
Sep 7, 2013, 6:27:40 PM9/7/13
to folg-...@googlegroups.com
I've improved the instructions for running the tools in the README.  In this case, you need to remove the .java extension from Gedcom2Json.
 
Dallan

Thomas Daly

unread,
Sep 8, 2013, 4:32:01 AM9/8/13
to folg-...@googlegroups.com, Dallan Quass
Many thanks for your help.  I will have another go shortly and let you know if I have any more problems (sorry!)

Thomas Daly

unread,
Feb 10, 2014, 7:09:01 AM2/10/14
to folg-...@googlegroups.com, Dallan Quass
Hi Dallan,

I successfully used your tool to create a JSON file from GEDCOM.  I would like to produce a hierarchical diagram from the data such as a vertical pedigree/descendant chart on a website - each box being represented by an HTML <div> element for example.  I am unsure about how to traverse the data in code to achieve this.  I wonder if you know of any outline approach or psuedocode that might help?

Many thanks,
Thomas

Dallan Quass

unread,
Feb 12, 2014, 4:02:50 PM2/12/14
to Thomas Daly, folg-...@googlegroups.com
The data is recursive: persons link to families and families link to persons.  So you might start with a person, then call person.getParentFamilies(gedcom) to get a list of Family objects, then for each Family object you could call family.getHusbands(gedcom) to get a list of (probably 0 or 1) husband person objects, and family.getWives(gedcom) to get a list of (probably 0 or 1) wife person objects, and then recursively call your function on each of the husband and wife people to get their parents.
Reply all
Reply to author
Forward
0 new messages