# yishunzhikong/gettemperature architecture

> Architecture diagram of the GitHub repository yishunzhikong/gettemperature, 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/yishunzhikong/gettemperature
- Repository: https://github.com/yishunzhikong/gettemperature

## Overview

This small script fetches daily temperature data for a configured city and date range from Tianqi, then writes date/minimum/maximum rows to an Excel workbook. The main block owns date iteration, workbook creation, row writes, and saving; getTemp performs the HTTP request and parses the response. The README documents the workflow. The graph is limited to the sampled single-file implementation.

Main entry points: [`getTemperature.py`](https://github.com/yishunzhikong/gettemperature/blob/master/getTemperature.py) (Date-range export)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Temperature export"]
  node_main["Date-range export<br/>[getTemperature.py]"]
  node_fetch["Daily fetch and parse<br/>[getTemperature.py]"]
  node_workbook["Excel workbook<br/>[getTemperature.py]"]
end

node_user(("Script operator"))
node_tianqi["Tianqi weather site"]

node_user -->|"runs configured"| node_main
node_main -->|"requests each day"| node_fetch
node_fetch -->|"requests page"| node_tianqi
node_tianqi -->|"returns HTML"| node_fetch
node_fetch -->|"returns temperatures"| node_main
node_main -->|"writes rows"| node_workbook
node_main -->|"saves XLSX"| node_workbook

click node_main "https://github.com/yishunzhikong/gettemperature/blob/master/getTemperature.py"
click node_fetch "https://github.com/yishunzhikong/gettemperature/blob/master/getTemperature.py"
click node_workbook "https://github.com/yishunzhikong/gettemperature/blob/master/getTemperature.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_fetch,node_workbook toneBlue
class node_user,node_tianqi toneIndigo
```

## Components

### Temperature export

- [Date-range export](https://github.com/yishunzhikong/gettemperature/blob/master/getTemperature.py): `getTemperature.py`
- [Daily fetch and parse](https://github.com/yishunzhikong/gettemperature/blob/master/getTemperature.py): `getTemperature.py`
- [Excel workbook](https://github.com/yishunzhikong/gettemperature/blob/master/getTemperature.py): `getTemperature.py`

### Other components

- **Script operator**
- **Tianqi weather site**

## Connections

- Script operator → Date-range export: runs configured
- Date-range export → Daily fetch and parse: requests each day
- Daily fetch and parse → Tianqi weather site: requests page
- Tianqi weather site → Daily fetch and parse: returns HTML
- Daily fetch and parse → Date-range export: returns temperatures
- Date-range export → Excel workbook: writes rows
- Date-range export → Excel workbook: saves XLSX
