# byztxt/byzantine-majority-text architecture

> Architecture diagram of the GitHub repository byztxt/byzantine-majority-text, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/byztxt/byzantine-majority-text
- Repository: https://github.com/byztxt/byzantine-majority-text

## Overview

##### Project type and purpose
- This is an open-source data-processing toolkit and repository for producing multiple representations of the Byzantine-textform Greek New Testament.
- It is not a web service or interactive application but a batch-oriented ETL pipeline: it ingests “source” files (Beta-code and CCAT text) and produces Unicode CSV and TEI-XML outputs, plus an R-based essay.

##### File structure
- Top-level folders:
– source/
· CCAT/ (raw BETA text with variants)
· Strongs/ (parsed & unparsed Beta code)
– scripts/ (Python converters and utilities)
– csv-unicode/ (generated CSV outputs, with subdirs for “ccat” and “strongs,” each subdivided by “with-variants,” “no-variants,” etc.)
– tei-xml-unicode/ (generated TEI-XML outputs, assets, two modes: “no-accents” and others)
– essay/ (R project and Quarto QMD essays)
- Config/build files: scripts/requirements.txt, tei_xml_header.xml, and __init__.py

##### README for additional insights
- Official source of truth: source/CCAT and source/Strongs files.
- csv-unicode and tei-xml-unicode are derived outputs produced by scripts.
- External standards referenced: IGNTP TEI P5, CollateX.
- Essay is supplementary documentation of Byzantine-textform theory.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Source Data
    subgraph "Source Data"
        CCAT["CCAT Beta Texts"]:::data
        Strongs["Strongs Beta BP5 Texts"]:::data
    end

    %% Conversion Scripts
    subgraph "Conversion Scripts"
        BetaConv["beta_to_unicode_custom.py"]:::script
        CSVConv["csv_converter.py"]:::script
        TEIConv["tei_xml_converter.py"]:::script
        Req["requirements.txt"]:::config
        TEIHeader["tei_xml_header.xml"]:::config
    end

    %% Output Repositories
    subgraph "Output Repositories"
        CSV_CCAT_NV["CSV CCAT No Variants"]:::data
        CSV_CCAT_WV["CSV CCAT With Variants"]:::data
        CSV_S_NO["CSV Strongs No Parsing"]:::data
        CSV_S_WP["CSV Strongs With Parsing"]:::data
        TEI_NoAcc["TEI-XML No-Accents"]:::data
        TEI_Assets["TEI-XML Assets"]:::data
    end

    %% Essay Module
    subgraph "Essay Module"
        Essays["Quarto Essays"]:::doc
        RProj["R Project"]:::doc
    end

    %% External Standards
    IGNT["IGNTP TEI P5 Guidelines"]:::external
    CollateX["CollateX"]:::external

    %% Data Flow
    CCAT -->|feeds| BetaConv
    Strongs -->|feeds| BetaConv

    CCAT -->|feeds| CSVConv
    Strongs -->|feeds| CSVConv

    CCAT -->|feeds| TEIConv
    Strongs -->|feeds| TEIConv

    BetaConv -->|"provides Unicode"| CSVConv
    BetaConv -->|"provides Unicode"| TEIConv

    CSVConv -->|"convert Beta→Unicode CSV"| CSV_CCAT_NV
    CSVConv -->|"convert Beta→Unicode CSV"| CSV_CCAT_WV
    CSVConv -->|"convert Beta→Unicode CSV"| CSV_S_NO
    CSVConv -->|"convert Beta→Unicode CSV"| CSV_S_WP

    TEIConv -->|"generate TEI/XML"| TEI_NoAcc
    TEIConv -->|"generate TEI/XML"| TEI_Assets

    %% Script Dependencies
    Req -->|provides libs| BetaConv
    Req -->|provides libs| CSVConv
    Req -->|provides libs| TEIConv
    TEIHeader -->|configuration| TEIConv

    %% Essay Module Relationships
    CCAT -->|references| Essays
    Strongs -->|references| Essays
    RProj -->|builds| Essays

    %% External Standards Integration
    IGNT -->|reference| TEIConv
    CollateX -->|reference| CSVConv

    %% Click Events
    click CCAT "https://github.com/byztxt/byzantine-majority-text/tree/master/source/CCAT/"
    click Strongs "https://github.com/byztxt/byzantine-majority-text/tree/master/source/Strongs/"
    click BetaConv "https://github.com/byztxt/byzantine-majority-text/blob/master/scripts/beta_to_unicode_custom/beta_to_unicode_custom.py"
    click CSVConv "https://github.com/byztxt/byzantine-majority-text/blob/master/scripts/csv_converter.py"
    click TEIConv "https://github.com/byztxt/byzantine-majority-text/blob/master/scripts/tei_xml_converter.py"
    click Req "https://github.com/byztxt/byzantine-majority-text/blob/master/scripts/requirements.txt"
    click TEIHeader "https://github.com/byztxt/byzantine-majority-text/blob/master/scripts/tei_xml_header.xml"
    click CSV_CCAT_NV "https://github.com/byztxt/byzantine-majority-text/tree/master/csv-unicode/ccat/no-variants/"
    click CSV_CCAT_WV "https://github.com/byztxt/byzantine-majority-text/tree/master/csv-unicode/ccat/with-variants/"
    click CSV_S_NO "https://github.com/byztxt/byzantine-majority-text/tree/master/csv-unicode/strongs/no-parsing/"
    click CSV_S_WP "https://github.com/byztxt/byzantine-majority-text/tree/master/csv-unicode/strongs/with-parsing/"
    click TEI_NoAcc "https://github.com/byztxt/byzantine-majority-text/tree/master/tei-xml-unicode/no-accents/"
    click TEI_Assets "https://github.com/byztxt/byzantine-majority-text/tree/master/tei-xml-unicode/assets/"
    click Essays "https://github.com/byztxt/byzantine-majority-text/blob/master/essay/case_byzantine_priority_en.qmd"
    click Essays "https://github.com/byztxt/byzantine-majority-text/blob/master/essay/case_byzantine_priority_es.qmd"
    click RProj "https://github.com/byztxt/byzantine-majority-text/blob/master/essay/essay.Rproj"

    %% Styles
    classDef data fill:#cce5ff,stroke:#004085,color:#004085;
    classDef script fill:#d4edda,stroke:#155724,color:#155724;
    classDef config fill:#fff3cd,stroke:#856404,color:#856404;
    classDef doc fill:#ffe5b4,stroke:#cc5200,color:#cc5200;
    classDef external fill:#e2e3e5,stroke:#383d41,color:#383d41;
```
