exstruct 0.1.1__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,356 @@
1
+ Metadata-Version: 2.3
2
+ Name: exstruct
3
+ Version: 0.2.0
4
+ Summary: Excel to structured JSON (tables, shapes, charts) for LLM/RAG pipelines
5
+ Keywords: excel,structure,data,exstruct
6
+ Author: harumiWeb
7
+ Author-email: harumiWeb <ganaharumi@outlook.jp>
8
+ License: BSD 3-Clause License
9
+
10
+ Copyright (c) 2025, ExStruct Contributors
11
+ All rights reserved.
12
+
13
+ Redistribution and use in source and binary forms, with or without
14
+ modification, are permitted provided that the following conditions are met:
15
+
16
+ 1. Redistributions of source code must retain the above copyright notice, this
17
+ list of conditions and the following disclaimer.
18
+
19
+ 2. Redistributions in binary form must reproduce the above copyright notice,
20
+ this list of conditions and the following disclaimer in the documentation
21
+ and/or other materials provided with the distribution.
22
+
23
+ 3. Neither the name of the copyright holder nor the names of its
24
+ contributors may be used to endorse or promote products derived from
25
+ this software without specific prior written permission.
26
+
27
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
31
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
33
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
34
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
35
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37
+ Requires-Dist: numpy>=2.3.5
38
+ Requires-Dist: openpyxl>=3.1.5
39
+ Requires-Dist: pandas>=2.3.3
40
+ Requires-Dist: pydantic>=2.12.5
41
+ Requires-Dist: scipy>=1.16.3
42
+ Requires-Dist: xlwings>=0.33.16
43
+ Requires-Dist: pypdfium2>=5.1.0 ; extra == 'render'
44
+ Requires-Dist: python-toon>=0.1.3 ; extra == 'toon'
45
+ Requires-Dist: pyyaml>=6.0.3 ; extra == 'yaml'
46
+ Requires-Python: >=3.11
47
+ Project-URL: Documentation, https://harumiweb.github.io/exstruct/
48
+ Project-URL: Homepage, https://harumiweb.github.io/exstruct/
49
+ Project-URL: Issues, https://github.com/harumiWeb/exstruct/issues
50
+ Project-URL: Repository, https://github.com/harumiWeb/exstruct
51
+ Provides-Extra: render
52
+ Provides-Extra: toon
53
+ Provides-Extra: yaml
54
+ Description-Content-Type: text/markdown
55
+
56
+ # ExStruct — Excel Structured Extraction Engine
57
+
58
+ <img width="3168" height="1344" alt="Gemini_Generated_Image_nlwx0bnlwx0bnlwx" src="https://github.com/user-attachments/assets/90231682-fb42-428e-bf01-4389e8116b65" />
59
+
60
+ ExStruct reads Excel workbooks and outputs structured data (tables, shapes, charts) as JSON by default, with optional YAML/TOON formats. It targets both COM/Excel environments (rich extraction) and non-COM environments (cells + table candidates), with tunable detection heuristics and multiple output modes to fit LLM/RAG pipelines.
61
+
62
+ ## Features
63
+
64
+ - **Excel → Structured JSON**: cells, shapes, charts, and table candidates per sheet.
65
+ - **Output modes**: `light` (cells + table candidates only), `standard` (texted shapes + arrows, charts), `verbose` (all shapes with width/height).
66
+ - **Formats**: JSON (compact by default, `--pretty` available), YAML, TOON (optional dependencies).
67
+ - **Table detection tuning**: adjust heuristics at runtime via API.
68
+ - **CLI rendering** (Excel required): optional PDF and per-sheet PNGs.
69
+ - **Graceful fallback**: if Excel COM is unavailable, extraction falls back to cells + table candidates without crashing.
70
+
71
+ ## Installation
72
+
73
+ ```bash
74
+ pip install exstruct
75
+ ```
76
+
77
+ Optional extras:
78
+
79
+ - YAML: `pip install pyyaml`
80
+ - TOON: `pip install python-toon`
81
+ - Rendering (PDF/PNG): Excel + `pip install pypdfium2`
82
+
83
+ ## Quick Start (CLI)
84
+
85
+ ```bash
86
+ exstruct input.xlsx > output.json # compact JSON to stdout (default)
87
+ exstruct input.xlsx -o out.json --pretty # pretty JSON to a file
88
+ exstruct input.xlsx --format yaml # YAML (needs pyyaml)
89
+ exstruct input.xlsx --format toon # TOON (needs python-toon)
90
+ exstruct input.xlsx --sheets-dir sheets/ # split per sheet in chosen format
91
+ exstruct input.xlsx --mode light # cells + table candidates only
92
+ exstruct input.xlsx --pdf --image # PDF and PNGs (Excel required)
93
+ ```
94
+
95
+ ## Quick Start (Python)
96
+
97
+ ```python
98
+ from pathlib import Path
99
+ from exstruct import extract, export, set_table_detection_params
100
+
101
+ # Tune table detection (optional)
102
+ set_table_detection_params(table_score_threshold=0.3, density_min=0.04)
103
+
104
+ # Extract with modes: "light", "standard", "verbose"
105
+ wb = extract("input.xlsx", mode="standard")
106
+ export(wb, Path("out.json"), pretty=False) # compact JSON
107
+
108
+ # Model helpers: iterate, index, and serialize directly from the models
109
+ first_sheet = wb["Sheet1"] # __getitem__ access
110
+ for name, sheet in wb: # __iter__ yields (name, SheetData)
111
+ print(name, len(sheet.rows))
112
+ wb.save("out.json", pretty=True) # WorkbookData → file (by extension)
113
+ first_sheet.save("sheet.json") # SheetData → file (by extension)
114
+ print(first_sheet.to_yaml()) # YAML text (requires pyyaml)
115
+ ```
116
+
117
+ ## Table Detection Tuning
118
+
119
+ ```python
120
+ from exstruct import set_table_detection_params
121
+
122
+ set_table_detection_params(
123
+ table_score_threshold=0.35, # increase to be stricter
124
+ density_min=0.05,
125
+ coverage_min=0.2,
126
+ min_nonempty_cells=3,
127
+ )
128
+ ```
129
+
130
+ Use higher thresholds to reduce false positives; lower them if true tables are missed.
131
+
132
+ ## Output Modes
133
+
134
+ - **light**: cells + table candidates (no COM needed).
135
+ - **standard**: texted shapes + arrows, charts (COM if available), table candidates.
136
+ - **verbose**: all shapes (with width/height), charts, table candidates.
137
+
138
+ ## Error Handling / Fallbacks
139
+
140
+ - Excel COM unavailable → falls back to cells + table candidates; shapes/charts empty.
141
+ - Shape extraction failure → logs warning, still returns cells + table candidates.
142
+ - CLI prints errors to stdout/stderr and returns non-zero on failures.
143
+
144
+ ## Optional Rendering
145
+
146
+ Requires Excel and `pypdfium2`.
147
+
148
+ ```bash
149
+ exstruct input.xlsx --pdf --image --dpi 144
150
+ ```
151
+
152
+ Creates `<output>.pdf` and `<output>_images/` PNGs per sheet.
153
+
154
+ ## Benchmark: Excel Structuring Demo
155
+
156
+ To show how well exstruct can structure Excel, we parse a workbook that combines three elements on one sheet and share an AI reasoning benchmark that uses the JSON output.
157
+
158
+ - Table (sales data)
159
+ - Line chart
160
+ - Flowchart built only with shapes
161
+
162
+ (Screenshot below is the actual sample Excel sheet)
163
+ <img width="1842" height="1242" alt="スクリーンショット 2025-12-04 221252" src="https://github.com/user-attachments/assets/37ffcb3d-121e-47c1-a59f-0497337c85d9" />
164
+
165
+ ### 1. Input: Excel Sheet Overview
166
+
167
+ This sample Excel contains:
168
+
169
+ ### ① Table (Sales Data)
170
+
171
+ | Month | Product A | Product B | Product C |
172
+ | ------ | --------- | --------- | --------- |
173
+ | Jan-25 | 120 | 80 | 60 |
174
+ | Feb-25 | 135 | 90 | 64 |
175
+ | Mar-25 | 150 | 100 | 70 |
176
+ | Apr-25 | 170 | 110 | 72 |
177
+ | May-25 | 160 | 120 | 75 |
178
+ | Jun-25 | 180 | 130 | 80 |
179
+
180
+ ### ② Chart (Line Chart)
181
+
182
+ - Title: Sales Data
183
+ - Series: Product A / Product B / Product C (six months)
184
+ - Y axis: 0–200
185
+
186
+ ### ③ Flowchart built with shapes
187
+
188
+ The sheet includes this flow:
189
+
190
+ - Start / End
191
+ - Format check
192
+ - Loop (items remaining?)
193
+ - Error handling
194
+ - Yes/No decision for sending email
195
+
196
+ ### 2. Output: Structured JSON produced by exstruct (excerpt)
197
+
198
+ Below is a **shortened JSON output example** from parsing this Excel workbook.
199
+
200
+ ```json
201
+ {
202
+ "book_name": "sample.xlsx",
203
+ "sheets": {
204
+ "Sheet1": {
205
+ "rows": [
206
+ {
207
+ "r": 3,
208
+ "c": {
209
+ "1": "月",
210
+ "2": "製品A",
211
+ "3": "製品B",
212
+ "4": "製品C"
213
+ }
214
+ },
215
+ ...
216
+ ],
217
+ "shapes": [
218
+ {
219
+ "text": "開始",
220
+ "l": 148,
221
+ "t": 220,
222
+ "type": "AutoShape-FlowchartProcess"
223
+ },
224
+ {
225
+ "text": "入力データ読み込み",
226
+ "l": 132,
227
+ "t": 282,
228
+ "type": "AutoShape-FlowchartProcess"
229
+ },
230
+ {
231
+ "l": 193,
232
+ "t": 246,
233
+ "type": "AutoShape-Mixed",
234
+ "begin_arrow_style": 1,
235
+ "end_arrow_style": 2,
236
+ "direction": "N"
237
+ },
238
+ ...
239
+ ],
240
+ "charts": [
241
+ {
242
+ "name": "Chart 1",
243
+ "chart_type": "Line",
244
+ "title": "売上データ",
245
+ "y_axis_range": [
246
+ 0.0,
247
+ 200.0
248
+ ],
249
+ "series": [
250
+ {
251
+ "name": "製品A",
252
+ "name_range": "Sheet1!$C$3",
253
+ "x_range": "Sheet1!$B$4:$B$9",
254
+ "y_range": "Sheet1!$C$4:$C$9"
255
+ },
256
+ ...
257
+ ],
258
+ "l": 377,
259
+ "t": 25
260
+ }
261
+ ],
262
+ "table_candidates": [
263
+ "B3:E9"
264
+ ]
265
+ }
266
+ }
267
+ }
268
+ ```
269
+
270
+ ### 3. How AI (Copilot / LLM) interprets the JSON
271
+
272
+ ````md
273
+ Below is the Markdown reconstruction of the Excel workbook. The table, chart, and flowchart are all represented.
274
+
275
+ ---
276
+
277
+ ## 📊 Sales Data Table
278
+
279
+ | Month | Product A | Product B | Product C |
280
+ | ---------- | --------- | --------- | --------- |
281
+ | 2025-01-01 | 120 | 80 | 60 |
282
+ | 2025-02-01 | 135 | 90 | 64 |
283
+ | 2025-03-01 | 150 | 100 | 70 |
284
+ | 2025-04-01 | 170 | 110 | 72 |
285
+ | 2025-05-01 | 160 | 120 | 75 |
286
+ | 2025-06-01 | 180 | 130 | 80 |
287
+
288
+ ---
289
+
290
+ ## 📈 Sales Data (Line Chart)
291
+
292
+ - Chart title: **売上データ (Sales Data)**
293
+ - Chart type: Line
294
+ - Y-axis range: 0 to 200
295
+ - Data series:
296
+ - Product A: 120 → 135 → 150 → 170 → 160 → 180
297
+ - Product B: 80 → 90 → 100 → 110 → 120 → 130
298
+ - Product C: 60 → 64 → 70 → 72 → 75 → 80
299
+
300
+ ---
301
+
302
+ ## 🔄 Process Flow (Mermaid Flowchart)
303
+
304
+ ```mermaid
305
+ flowchart TD
306
+ A[Start]
307
+ B[Load input data]
308
+ C{Is format valid?}
309
+ D[Show error]
310
+ E[Process one item]
311
+ F{Items remaining?}
312
+ G[Generate output]
313
+ H{Send email?}
314
+ I[Send email]
315
+ J[Finish]
316
+
317
+ A --> B
318
+ B --> C
319
+ C -- no --> D
320
+ C -- yes --> E
321
+ E --> F
322
+ F -- yes --> E
323
+ F -- no --> G
324
+ G --> H
325
+ H -- yes --> I
326
+ H -- no --> J
327
+ I --> J
328
+ ```
329
+ ````
330
+
331
+ From this we can see:
332
+
333
+ **exstruct's JSON is already in a format that AI can read and reason over directly.**
334
+
335
+ ### 4. Summary
336
+
337
+ This benchmark confirms exstruct can:
338
+
339
+ - **Parse tables, charts, and shapes (flowcharts) simultaneously**
340
+ - Convert the semantic structure of Excel into JSON
341
+ - Let AI/LLMs read that JSON directly and reconstruct the workbook contents
342
+
343
+ In short, **exstruct = “an engine that converts Excel into a format AI can understand.”**
344
+
345
+ ## Notes
346
+
347
+ - Default JSON is compact to reduce tokens; use `--pretty` or `pretty=True` when readability matters.
348
+ - Field `table_candidates` replaces `tables`; adjust downstream consumers accordingly.
349
+
350
+ ## License
351
+
352
+ BSD-3-Clause. See `LICENSE` for details.
353
+
354
+ ## Documentation
355
+
356
+ - API Reference (GitHub Pages): https://harumiweb.github.io/exstruct/
@@ -0,0 +1,301 @@
1
+ # ExStruct — Excel Structured Extraction Engine
2
+
3
+ <img width="3168" height="1344" alt="Gemini_Generated_Image_nlwx0bnlwx0bnlwx" src="https://github.com/user-attachments/assets/90231682-fb42-428e-bf01-4389e8116b65" />
4
+
5
+ ExStruct reads Excel workbooks and outputs structured data (tables, shapes, charts) as JSON by default, with optional YAML/TOON formats. It targets both COM/Excel environments (rich extraction) and non-COM environments (cells + table candidates), with tunable detection heuristics and multiple output modes to fit LLM/RAG pipelines.
6
+
7
+ ## Features
8
+
9
+ - **Excel → Structured JSON**: cells, shapes, charts, and table candidates per sheet.
10
+ - **Output modes**: `light` (cells + table candidates only), `standard` (texted shapes + arrows, charts), `verbose` (all shapes with width/height).
11
+ - **Formats**: JSON (compact by default, `--pretty` available), YAML, TOON (optional dependencies).
12
+ - **Table detection tuning**: adjust heuristics at runtime via API.
13
+ - **CLI rendering** (Excel required): optional PDF and per-sheet PNGs.
14
+ - **Graceful fallback**: if Excel COM is unavailable, extraction falls back to cells + table candidates without crashing.
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ pip install exstruct
20
+ ```
21
+
22
+ Optional extras:
23
+
24
+ - YAML: `pip install pyyaml`
25
+ - TOON: `pip install python-toon`
26
+ - Rendering (PDF/PNG): Excel + `pip install pypdfium2`
27
+
28
+ ## Quick Start (CLI)
29
+
30
+ ```bash
31
+ exstruct input.xlsx > output.json # compact JSON to stdout (default)
32
+ exstruct input.xlsx -o out.json --pretty # pretty JSON to a file
33
+ exstruct input.xlsx --format yaml # YAML (needs pyyaml)
34
+ exstruct input.xlsx --format toon # TOON (needs python-toon)
35
+ exstruct input.xlsx --sheets-dir sheets/ # split per sheet in chosen format
36
+ exstruct input.xlsx --mode light # cells + table candidates only
37
+ exstruct input.xlsx --pdf --image # PDF and PNGs (Excel required)
38
+ ```
39
+
40
+ ## Quick Start (Python)
41
+
42
+ ```python
43
+ from pathlib import Path
44
+ from exstruct import extract, export, set_table_detection_params
45
+
46
+ # Tune table detection (optional)
47
+ set_table_detection_params(table_score_threshold=0.3, density_min=0.04)
48
+
49
+ # Extract with modes: "light", "standard", "verbose"
50
+ wb = extract("input.xlsx", mode="standard")
51
+ export(wb, Path("out.json"), pretty=False) # compact JSON
52
+
53
+ # Model helpers: iterate, index, and serialize directly from the models
54
+ first_sheet = wb["Sheet1"] # __getitem__ access
55
+ for name, sheet in wb: # __iter__ yields (name, SheetData)
56
+ print(name, len(sheet.rows))
57
+ wb.save("out.json", pretty=True) # WorkbookData → file (by extension)
58
+ first_sheet.save("sheet.json") # SheetData → file (by extension)
59
+ print(first_sheet.to_yaml()) # YAML text (requires pyyaml)
60
+ ```
61
+
62
+ ## Table Detection Tuning
63
+
64
+ ```python
65
+ from exstruct import set_table_detection_params
66
+
67
+ set_table_detection_params(
68
+ table_score_threshold=0.35, # increase to be stricter
69
+ density_min=0.05,
70
+ coverage_min=0.2,
71
+ min_nonempty_cells=3,
72
+ )
73
+ ```
74
+
75
+ Use higher thresholds to reduce false positives; lower them if true tables are missed.
76
+
77
+ ## Output Modes
78
+
79
+ - **light**: cells + table candidates (no COM needed).
80
+ - **standard**: texted shapes + arrows, charts (COM if available), table candidates.
81
+ - **verbose**: all shapes (with width/height), charts, table candidates.
82
+
83
+ ## Error Handling / Fallbacks
84
+
85
+ - Excel COM unavailable → falls back to cells + table candidates; shapes/charts empty.
86
+ - Shape extraction failure → logs warning, still returns cells + table candidates.
87
+ - CLI prints errors to stdout/stderr and returns non-zero on failures.
88
+
89
+ ## Optional Rendering
90
+
91
+ Requires Excel and `pypdfium2`.
92
+
93
+ ```bash
94
+ exstruct input.xlsx --pdf --image --dpi 144
95
+ ```
96
+
97
+ Creates `<output>.pdf` and `<output>_images/` PNGs per sheet.
98
+
99
+ ## Benchmark: Excel Structuring Demo
100
+
101
+ To show how well exstruct can structure Excel, we parse a workbook that combines three elements on one sheet and share an AI reasoning benchmark that uses the JSON output.
102
+
103
+ - Table (sales data)
104
+ - Line chart
105
+ - Flowchart built only with shapes
106
+
107
+ (Screenshot below is the actual sample Excel sheet)
108
+ <img width="1842" height="1242" alt="スクリーンショット 2025-12-04 221252" src="https://github.com/user-attachments/assets/37ffcb3d-121e-47c1-a59f-0497337c85d9" />
109
+
110
+ ### 1. Input: Excel Sheet Overview
111
+
112
+ This sample Excel contains:
113
+
114
+ ### ① Table (Sales Data)
115
+
116
+ | Month | Product A | Product B | Product C |
117
+ | ------ | --------- | --------- | --------- |
118
+ | Jan-25 | 120 | 80 | 60 |
119
+ | Feb-25 | 135 | 90 | 64 |
120
+ | Mar-25 | 150 | 100 | 70 |
121
+ | Apr-25 | 170 | 110 | 72 |
122
+ | May-25 | 160 | 120 | 75 |
123
+ | Jun-25 | 180 | 130 | 80 |
124
+
125
+ ### ② Chart (Line Chart)
126
+
127
+ - Title: Sales Data
128
+ - Series: Product A / Product B / Product C (six months)
129
+ - Y axis: 0–200
130
+
131
+ ### ③ Flowchart built with shapes
132
+
133
+ The sheet includes this flow:
134
+
135
+ - Start / End
136
+ - Format check
137
+ - Loop (items remaining?)
138
+ - Error handling
139
+ - Yes/No decision for sending email
140
+
141
+ ### 2. Output: Structured JSON produced by exstruct (excerpt)
142
+
143
+ Below is a **shortened JSON output example** from parsing this Excel workbook.
144
+
145
+ ```json
146
+ {
147
+ "book_name": "sample.xlsx",
148
+ "sheets": {
149
+ "Sheet1": {
150
+ "rows": [
151
+ {
152
+ "r": 3,
153
+ "c": {
154
+ "1": "月",
155
+ "2": "製品A",
156
+ "3": "製品B",
157
+ "4": "製品C"
158
+ }
159
+ },
160
+ ...
161
+ ],
162
+ "shapes": [
163
+ {
164
+ "text": "開始",
165
+ "l": 148,
166
+ "t": 220,
167
+ "type": "AutoShape-FlowchartProcess"
168
+ },
169
+ {
170
+ "text": "入力データ読み込み",
171
+ "l": 132,
172
+ "t": 282,
173
+ "type": "AutoShape-FlowchartProcess"
174
+ },
175
+ {
176
+ "l": 193,
177
+ "t": 246,
178
+ "type": "AutoShape-Mixed",
179
+ "begin_arrow_style": 1,
180
+ "end_arrow_style": 2,
181
+ "direction": "N"
182
+ },
183
+ ...
184
+ ],
185
+ "charts": [
186
+ {
187
+ "name": "Chart 1",
188
+ "chart_type": "Line",
189
+ "title": "売上データ",
190
+ "y_axis_range": [
191
+ 0.0,
192
+ 200.0
193
+ ],
194
+ "series": [
195
+ {
196
+ "name": "製品A",
197
+ "name_range": "Sheet1!$C$3",
198
+ "x_range": "Sheet1!$B$4:$B$9",
199
+ "y_range": "Sheet1!$C$4:$C$9"
200
+ },
201
+ ...
202
+ ],
203
+ "l": 377,
204
+ "t": 25
205
+ }
206
+ ],
207
+ "table_candidates": [
208
+ "B3:E9"
209
+ ]
210
+ }
211
+ }
212
+ }
213
+ ```
214
+
215
+ ### 3. How AI (Copilot / LLM) interprets the JSON
216
+
217
+ ````md
218
+ Below is the Markdown reconstruction of the Excel workbook. The table, chart, and flowchart are all represented.
219
+
220
+ ---
221
+
222
+ ## 📊 Sales Data Table
223
+
224
+ | Month | Product A | Product B | Product C |
225
+ | ---------- | --------- | --------- | --------- |
226
+ | 2025-01-01 | 120 | 80 | 60 |
227
+ | 2025-02-01 | 135 | 90 | 64 |
228
+ | 2025-03-01 | 150 | 100 | 70 |
229
+ | 2025-04-01 | 170 | 110 | 72 |
230
+ | 2025-05-01 | 160 | 120 | 75 |
231
+ | 2025-06-01 | 180 | 130 | 80 |
232
+
233
+ ---
234
+
235
+ ## 📈 Sales Data (Line Chart)
236
+
237
+ - Chart title: **売上データ (Sales Data)**
238
+ - Chart type: Line
239
+ - Y-axis range: 0 to 200
240
+ - Data series:
241
+ - Product A: 120 → 135 → 150 → 170 → 160 → 180
242
+ - Product B: 80 → 90 → 100 → 110 → 120 → 130
243
+ - Product C: 60 → 64 → 70 → 72 → 75 → 80
244
+
245
+ ---
246
+
247
+ ## 🔄 Process Flow (Mermaid Flowchart)
248
+
249
+ ```mermaid
250
+ flowchart TD
251
+ A[Start]
252
+ B[Load input data]
253
+ C{Is format valid?}
254
+ D[Show error]
255
+ E[Process one item]
256
+ F{Items remaining?}
257
+ G[Generate output]
258
+ H{Send email?}
259
+ I[Send email]
260
+ J[Finish]
261
+
262
+ A --> B
263
+ B --> C
264
+ C -- no --> D
265
+ C -- yes --> E
266
+ E --> F
267
+ F -- yes --> E
268
+ F -- no --> G
269
+ G --> H
270
+ H -- yes --> I
271
+ H -- no --> J
272
+ I --> J
273
+ ```
274
+ ````
275
+
276
+ From this we can see:
277
+
278
+ **exstruct's JSON is already in a format that AI can read and reason over directly.**
279
+
280
+ ### 4. Summary
281
+
282
+ This benchmark confirms exstruct can:
283
+
284
+ - **Parse tables, charts, and shapes (flowcharts) simultaneously**
285
+ - Convert the semantic structure of Excel into JSON
286
+ - Let AI/LLMs read that JSON directly and reconstruct the workbook contents
287
+
288
+ In short, **exstruct = “an engine that converts Excel into a format AI can understand.”**
289
+
290
+ ## Notes
291
+
292
+ - Default JSON is compact to reduce tokens; use `--pretty` or `pretty=True` when readability matters.
293
+ - Field `table_candidates` replaces `tables`; adjust downstream consumers accordingly.
294
+
295
+ ## License
296
+
297
+ BSD-3-Clause. See `LICENSE` for details.
298
+
299
+ ## Documentation
300
+
301
+ - API Reference (GitHub Pages): https://harumiweb.github.io/exstruct/
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "exstruct"
3
- version = "0.1.1"
3
+ version = "0.2.0"
4
4
  description = "Excel to structured JSON (tables, shapes, charts) for LLM/RAG pipelines"
5
5
  readme = "README.md"
6
6
  license = { file = "LICENSE" }
@@ -8,7 +8,7 @@ keywords = ["excel", "structure", "data", "exstruct"]
8
8
  authors = [
9
9
  { name = "harumiWeb", email = "ganaharumi@outlook.jp" }
10
10
  ]
11
- requires-python = ">=3.12"
11
+ requires-python = ">=3.11"
12
12
  dependencies = [
13
13
  "numpy>=2.3.5",
14
14
  "openpyxl>=3.1.5",