How elliotchance/gedcom works
Main Components
a. Core Library Layer:
• Main data structures (Document, Node, Individual, Family, etc.)
• Encoder/decoder components for GEDCOM file processing
b. Query Engine Layer:
• Query engine ('q' package) as a separate module
• Parser, engine, and various expression types
• Different formatters (CSV, JSON, HTML, GEDCOM)
c. HTML Generation Layer:
• HTML rendering system
• Core components and specialized renderers
• To the main GEDCOM processing layer
d. CLI Tools Layer:
• Main command-line tools:
• gedcomq (query tool)
• diff (comparison tool)
• publish (HTML generation)
• warnings (validation)
Relationships and Data Flow
• GEDCOM file input → Decoder → Internal representation
• Internal representation → Encoder → GEDCOM file output
• Query flow: Input → Parser → Engine → Formatter → Output
• HTML generation flow: GEDCOM data → HTML components → Static website
Important Design Elements
• Warning system components
• Comparison/diff functionality
• Merge operations
• Various node types (Individual, Family, Event, etc.)
Specific Implementation Details
Interfaces:
• Noder interface
• Gedcomer interface
• Warner interface
• Various node implementations
External Interactions
Include:
• File I/O operations
• HTML output
• Query input/output formats
• API integration points