# qihahfirhat/photo-report-generator architecture

> Architecture diagram of the GitHub repository qihahfirhat/photo-report-generator, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/qihahfirhat/photo-report-generator
- Repository: https://github.com/qihahfirhat/photo-report-generator

## Overview

This command-line utility turns a ZIP or RAR of photographs into an editable Excel photo report. Its workflow extracts the archive, finds supported images, divides them into six-image pages, formats worksheets with titles and print settings, embeds images and editable labels, and saves the workbook. The runtime is implemented in one script, so its stages share that path. The README documents archive types and report features; relationships shown here are supported by the script excerpt.

Main entry points: [`dilapidation_report.py`](https://github.com/qihahfirhat/photo-report-generator/blob/main/dilapidation_report.py) (Page orchestration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_processing["Report generation"]
  node_cli["CLI entry point"]
  node_extract["Archive extraction"]
  node_images["Image discovery"]
  node_pages["Page orchestration"]
  node_worksheet["Worksheet formatting"]
  node_placement["Image and labels"]
  node_workbook["Excel workbook"]
end

node_surveyor(("Report user"))
node_archive["Photo archive"]
node_output["XLSX report"]

node_surveyor -->|"runs command"| node_cli
node_surveyor -->|"provides photos"| node_archive
node_cli -->|"calls"| node_pages
node_pages -->|"extracts archive"| node_extract
node_extract -->|"finds images"| node_images
node_pages -->|"creates workbook"| node_workbook
node_pages -->|"configures sheets"| node_worksheet
node_pages -->|"places photos"| node_placement
node_pages -->|"saves workbook"| node_workbook
node_workbook -->|"writes XLSX"| node_output

click node_cli "https://github.com/qihahfirhat/photo-report-generator/blob/main/dilapidation_report.py"
click node_extract "https://github.com/qihahfirhat/photo-report-generator/blob/main/dilapidation_report.py"
click node_images "https://github.com/qihahfirhat/photo-report-generator/blob/main/dilapidation_report.py"
click node_pages "https://github.com/qihahfirhat/photo-report-generator/blob/main/dilapidation_report.py"
click node_worksheet "https://github.com/qihahfirhat/photo-report-generator/blob/main/dilapidation_report.py"
click node_placement "https://github.com/qihahfirhat/photo-report-generator/blob/main/dilapidation_report.py"
click node_workbook "https://github.com/qihahfirhat/photo-report-generator/blob/main/dilapidation_report.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_cli,node_extract,node_images,node_pages,node_worksheet,node_placement,node_workbook,node_surveyor toneBlue
class node_archive,node_output toneIndigo
```

## Components

### Report generation

- [CLI entry point](https://github.com/qihahfirhat/photo-report-generator/blob/main/dilapidation_report.py): `dilapidation_report.py`
- [Archive extraction](https://github.com/qihahfirhat/photo-report-generator/blob/main/dilapidation_report.py): `dilapidation_report.py`
- [Image discovery](https://github.com/qihahfirhat/photo-report-generator/blob/main/dilapidation_report.py): `dilapidation_report.py`
- [Page orchestration](https://github.com/qihahfirhat/photo-report-generator/blob/main/dilapidation_report.py): `dilapidation_report.py`
- [Worksheet formatting](https://github.com/qihahfirhat/photo-report-generator/blob/main/dilapidation_report.py): `dilapidation_report.py`
- [Image and labels](https://github.com/qihahfirhat/photo-report-generator/blob/main/dilapidation_report.py): `dilapidation_report.py`
- [Excel workbook](https://github.com/qihahfirhat/photo-report-generator/blob/main/dilapidation_report.py): `dilapidation_report.py`

### Other components

- **Report user**
- **Photo archive**
- **XLSX report**

## Connections

- Report user → CLI entry point: runs command (evidence: `README.md`)
- Report user → Photo archive: provides photos (evidence: `README.md`)
- CLI entry point → Page orchestration: calls (evidence: `dilapidation_report.py`)
- Page orchestration → Archive extraction: extracts archive (evidence: `dilapidation_report.py`)
- Archive extraction → Image discovery: finds images (evidence: `dilapidation_report.py`)
- Page orchestration → Excel workbook: creates workbook (evidence: `dilapidation_report.py`)
- Page orchestration → Worksheet formatting: configures sheets (evidence: `dilapidation_report.py`)
- Page orchestration → Image and labels: places photos (evidence: `dilapidation_report.py`)
- Page orchestration → Excel workbook: saves workbook (evidence: `dilapidation_report.py`)
- Excel workbook → XLSX report: writes XLSX (evidence: `dilapidation_report.py`)
