GEDCOM 7 data interchange, relationship queries and audit tools for MoonBit
moon test --target js --deny-warn
node scripts/build-engine.mjs
node scripts/moonged.mjs inspect examples/family.ged
node scripts/moonged.mjs path examples/family.ged I5 I1
node scripts/moonged.mjs normalize examples/family.ged --save exported.ged
node scripts/moonged.mjs csv examples/family.ged --save people.csv
node scripts/serve.mjsimport { "forey217/moonged" @ged }
fn parent_names(text : String, child_id : String) -> Array[String] raise {
let doc = @ged.parse(text)
let graph = @ged.graph(doc)
graph.ancestors(child_id, max_depth=1)
.map(fn(r) raise { @ged.person(doc, r.person).display_name() })
}pub(all) suberror GedError {
Syntax(Int, String)
Limit(String)
InvalidState(String)
Query(String)
} derive(Debug)pub struct ByteParser {
// private fields
}pub struct DatePoint {
calendar : Calendar
year : Int
month : Int?
day : Int?
bce : Bool
month_tag : String?
epoch : String?
}pub struct DateWindow {
earliest : Int64?
latest : Int64?
}pub struct Document {
// private fields
}pub struct Family {
record : Int
id : String?
husband : String?
wife : String?
children : Array[String]
}pub struct FamilyGraph {
// private fields
}fn FamilyGraph::ancestors(self : FamilyGraph, id : String, max_depth? : Int) -> Array[Reachable] raise GedErrorfn FamilyGraph::descendants(self : FamilyGraph, id : String, max_depth? : Int) -> Array[Reachable] raise GedErrorfn FamilyGraph::shortest_path(self : FamilyGraph, from : String, to : String, max_depth? : Int) -> Array[Edge]? raise GedErrorpub struct Limits {
max_nodes : Int
max_depth : Int
max_line_units : Int
max_total_units : Int
}pub struct Parser {
// private fields
}fn html_to_plain(text : String) -> Stringfn run_json(request : String) -> StringInstall
Download zipGEDCOM 7 data interchange, relationship queries and audit tools for MoonBit