# kqwyf/genshintexts architecture

> Architecture diagram of the GitHub repository kqwyf/genshintexts, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kqwyf/genshintexts
- Repository: https://github.com/kqwyf/genshintexts

## Overview

GenshinTexts is a command-line data normalizer that turns extracted Genshin Impact game data into structured story and reference-text files. The documented user workflow is to provide a Dimbreath data directory, configure language and text-cleaning options, and run the script. Its principal domain outputs cover dialogue traces and quest ordering, quest metadata, and avatar, item, weapon, and artifact text. The implementation is concentrated in main.py; the excerpts do not establish separate runtime modules or all internal call relationships.

Main entry points: [`main.py`](https://github.com/kqwyf/genshintexts/blob/master/main.py) (Parse and normalize)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Data processing"]
  node_main["Parse and normalize<br/>[main.py]"]
end

subgraph group_story["Story outputs"]
  node_dialogue["Dialogue traces<br/>[main.py]"]
  node_quests["Quest structure<br/>[main.py]"]
  node_dialog_json["dialog.json"]
  node_quest_json["quest.json"]
end

subgraph group_catalog["Reference outputs"]
  node_avatar["Avatar text<br/>[main.py]"]
  node_items["Item text<br/>[main.py]"]
  node_weapons["Weapon text<br/>[main.py]"]
  node_artifacts["Artifact text<br/>[main.py]"]
  node_avatar_csv["avatar.csv"]
  node_item_csv["item.csv"]
  node_weapon_csv["weapon.csv"]
  node_reliquary_csv["reliquary.csv"]
end

node_user(("CLI user"))
node_source_data["Game data directory"]

node_user -->|"runs with options"| node_main
node_source_data -->|"provides input"| node_main
node_main -->|"processes dialogue"| node_dialogue
node_main -->|"processes quests"| node_quests
node_main -->|"processes text"| node_avatar
node_main -->|"processes text"| node_items
node_main -->|"processes text"| node_weapons
node_main -->|"processes text"| node_artifacts
node_dialogue -->|"writes"| node_dialog_json
node_quests -->|"writes"| node_quest_json
node_avatar -->|"writes"| node_avatar_csv
node_items -->|"writes"| node_item_csv
node_weapons -->|"writes"| node_weapon_csv
node_artifacts -->|"writes"| node_reliquary_csv

click node_main "https://github.com/kqwyf/genshintexts/blob/master/main.py"
click node_dialogue "https://github.com/kqwyf/genshintexts/blob/master/main.py"
click node_quests "https://github.com/kqwyf/genshintexts/blob/master/main.py"
click node_avatar "https://github.com/kqwyf/genshintexts/blob/master/main.py"
click node_items "https://github.com/kqwyf/genshintexts/blob/master/main.py"
click node_weapons "https://github.com/kqwyf/genshintexts/blob/master/main.py"
click node_artifacts "https://github.com/kqwyf/genshintexts/blob/master/main.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_user toneBlue
class node_dialogue,node_quests,node_dialog_json,node_quest_json toneAmber
class node_avatar,node_items,node_weapons,node_artifacts,node_avatar_csv,node_item_csv,node_weapon_csv,node_reliquary_csv toneMint
class node_source_data toneIndigo
```

## Components

### Data processing

- [Parse and normalize](https://github.com/kqwyf/genshintexts/blob/master/main.py): `main.py`

### Story outputs

- [Dialogue traces](https://github.com/kqwyf/genshintexts/blob/master/main.py): `main.py`
- [Quest structure](https://github.com/kqwyf/genshintexts/blob/master/main.py): `main.py`
- **dialog.json**
- **quest.json**

### Reference outputs

- [Avatar text](https://github.com/kqwyf/genshintexts/blob/master/main.py): `main.py`
- [Item text](https://github.com/kqwyf/genshintexts/blob/master/main.py): `main.py`
- [Weapon text](https://github.com/kqwyf/genshintexts/blob/master/main.py): `main.py`
- [Artifact text](https://github.com/kqwyf/genshintexts/blob/master/main.py): `main.py`
- **avatar.csv**
- **item.csv**
- **weapon.csv**
- **reliquary.csv**

### Other components

- **CLI user**
- **Game data directory**

## Connections

- CLI user → Parse and normalize: runs with options
- Game data directory → Parse and normalize: provides input
- Parse and normalize → Dialogue traces: processes dialogue
- Parse and normalize → Quest structure: processes quests
- Parse and normalize → Avatar text: processes text
- Parse and normalize → Item text: processes text
- Parse and normalize → Weapon text: processes text
- Parse and normalize → Artifact text: processes text
- Dialogue traces → dialog.json: writes
- Quest structure → quest.json: writes
- Avatar text → avatar.csv: writes
- Item text → item.csv: writes
- Weapon text → weapon.csv: writes
- Artifact text → reliquary.csv: writes
