# mirandadam/iau-starnames architecture

> Architecture diagram of the GitHub repository mirandadam/iau-starnames, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mirandadam/iau-starnames
- Repository: https://github.com/mirandadam/iau-starnames

## Overview

##### Project type and purpose
- This is a standalone Python-based ETL (Extract-Transform-Load) tool.
- Purpose: download the official IAU Catalog of Star Names, parse and normalize its fixed-width text, and export it in JSON, TSV, and cleaned text formats.

##### File structure
- Top level:
- download.py – orchestrator script
- LICENSE, README.md – documentation
- catalog_data/ directory – local file storage for:
- IAU-CSN.txt (raw download)
- IAU-CSN_normalized.txt (cleaned raw)
- IAU-CSN.json (JSON output)
- IAU-CSN.tsv (TSV output)

##### README for additional insights
- External dependency: IAU’s public text file served over HTTP.
- Processing steps: download → parse fixed-width columns → normalize alignment/characters → output multiple formats.
- No web server, no database, no GUI – purely a file-based pipeline.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% External Service
    External["External IAU CSN Service"]:::external

    %% Decision
    Decision{"IAU-CSN.txt exists?"}:::decision

    %% Processing Modules
    DownloadModule["Download Module"]:::processing
    FileLoader["File Loader"]:::processing
    Parser["Parser"]:::processing
    Normalizer["Normalizer"]:::processing

    %% Exporters
    JSONExporter["JSON Exporter"]:::processing
    TSVExporter["TSV Exporter"]:::processing
    TextWriter["Normalized Text Writer"]:::processing

    %% File System
    FileSystem[(catalog_data/)]:::storage

    %% Raw Data Store
    RawDataStore[(IAU-CSN.txt)]:::storage

    %% Flow
    External -->|"HTTP GET raw text"| Decision
    Decision -->|no| DownloadModule
    DownloadModule -->|"write raw text"| RawDataStore
    Decision -->|yes| FileLoader
    DownloadModule --> FileLoader
    FileLoader -->|"raw text"| Parser
    Parser -->|"intermediate model"| Normalizer
    Normalizer -->|"JSON"| JSONExporter
    Normalizer -->|"TSV"| TSVExporter
    Normalizer -->|"normalized TXT"| TextWriter
    JSONExporter -->|"IAU-CSN.json"| FileSystem
    TSVExporter -->|"IAU-CSN.tsv"| FileSystem
    TextWriter -->|"IAU-CSN_normalized.txt"| FileSystem

    %% Click Events
    click DownloadModule "https://github.com/mirandadam/iau-starnames/blob/master/download.py"
    click FileLoader "https://github.com/mirandadam/iau-starnames/blob/master/download.py"
    click Parser "https://github.com/mirandadam/iau-starnames/blob/master/download.py"
    click Normalizer "https://github.com/mirandadam/iau-starnames/blob/master/download.py"
    click JSONExporter "https://github.com/mirandadam/iau-starnames/blob/master/catalog_data/IAU-CSN.json"
    click TSVExporter "https://github.com/mirandadam/iau-starnames/blob/master/catalog_data/IAU-CSN.tsv"
    click TextWriter "https://github.com/mirandadam/iau-starnames/blob/master/catalog_data/IAU-CSN_normalized.txt"
    click RawDataStore "https://github.com/mirandadam/iau-starnames/blob/master/catalog_data/IAU-CSN.txt"
    click FileSystem "https://github.com/mirandadam/iau-starnames/tree/master/catalog_data/"

    %% Styles
    classDef processing fill:#D0E8FF,stroke:#0366d6,stroke-width:2px
    classDef storage fill:#DFFFE0,stroke:#28a745,stroke-width:2px
    classDef external fill:#F0F0F0,stroke:#888888,stroke-width:2px
    classDef decision fill:#FFF4D6,stroke:#FFAB00,stroke-width:2px
```
