Expand description
A parser for GEDCOM files
use gedcom::parser::Parser;
// the parser takes the gedcom file contents as a chars iterator
let gedcom_source = std::fs::read_to_string("./tests/fixtures/sample.ged").unwrap();
let mut parser = Parser::new(gedcom_source.chars());
let gedcom_data = parser.parse_record();
// output some stats on the gedcom contents
gedcom_data.stats();
This crate contains an optional "json"
feature that implements serialization & deserialization to json with serde
.
Modules§
- parser
- The state machine that parses a char iterator of the gedcom’s contents
- tokenizer
- Handles the tokenization of a GEDCOM file
- types
- Structs and datatypes used to represent facts and data in a Gedcom file
Macros§
- fmt_
optional_ value - Macro for displaying
Option
s in debug mode without the text wrapping.
Structs§
- Gedcom
Data - The data structure representing all the data within a gedcom file
Functions§
- parse
- Helper function for converting GEDCOM file content stream to parsed data.