Compare commits

...

48 Commits

Author SHA1 Message Date
95e0acbe71 Add GUI refactor, modern theme, and configuration improvements
Some checks failed
Mirror to Gitea / mirror (push) Has been cancelled
2026-08-10 14:28:49 +03:30
a39cccb0dc Bump major version to 1.0.0
Some checks failed
Mirror to Gitea / mirror (push) Has been cancelled
2026-08-10 14:25:37 +03:30
5d827ae70d Merge pull request #19 from s-diaco/cursor/automate-version-bumps-d2eb
Some checks failed
Mirror to Gitea / mirror (push) Has been cancelled
Automate package version bumps
2026-08-08 20:23:34 +03:30
Cursor Agent
8ee6cebea3 Automate package version bumps with bump-my-version
Some checks failed
Mirror to Gitea / mirror (push) Has been cancelled
Use a non-numeric web UI fallback, configure bump-my-version against
pyproject.toml, and add a workflow_dispatch Action that opens a bump PR.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-08-08 15:42:43 +00:00
a07d3b46dc Merge pull request #18 from s-diaco/cursor/bump-minor-0-2-0-d2eb
Some checks failed
Mirror to Gitea / mirror (push) Has been cancelled
Bump version to 0.2.0
2026-08-08 19:07:00 +03:30
Cursor Agent
78d1a0a5fc Bump package version to 0.2.0
Some checks failed
Mirror to Gitea / mirror (push) Has been cancelled
Advance the minor version in pyproject.toml and the web UI fallback
so the displayed app version matches the release.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-08-08 15:34:57 +00:00
89bb9689e9 Merge pull request #17 from s-diaco/cursor/file-data-beige-cell-d2eb
Some checks failed
Mirror to Gitea / mirror (push) Has been cancelled
Update KRBG1600T Beige clear cell to Batch!F12
2026-08-08 18:56:58 +03:30
Cursor Agent
86d0006291 Update KRBG1600T Beige clear cell from G12 to F12
Some checks failed
Mirror to Gitea / mirror (push) Has been cancelled
Align the Kimia Razi beige row cells_to_clear with the intended
Batch!F12 target in file_data.csv.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-08-08 15:24:50 +00:00
8443149979 Merge pull request #16 from s-diaco/cursor/gitea-mirror-action-d2eb
Some checks failed
Mirror to Gitea / mirror (push) Has been cancelled
Add GitHub Action to mirror repo to Gitea
2026-08-08 18:49:37 +03:30
Cursor Agent
3a0e02d9e0 Fix Gitea mirror by skipping GitHub pull refs
Some checks failed
Mirror to Gitea / mirror (push) Has been cancelled
Push only refs/heads and refs/tags so Gitea no longer rejects
refs/pull/* with "hook declined" and fails the mirror job.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-08-08 15:18:22 +00:00
Cursor Agent
19b81201b8 Add GitHub Action to mirror repository to Gitea
Some checks failed
Mirror to Gitea / mirror (push) Has been cancelled
Push all branches and tags to git.faryad.top after every GitHub ref
change so Gitea stays identical to GitHub when GITEA_TOKEN is set.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-08-08 15:07:18 +00:00
f1b99e5da9 Merge pull request #15 from s-diaco/cursor/datasheet-creation-logging-d2eb
Add timestamped logging for QC datasheet creation
2026-08-08 18:13:14 +03:30
Cursor Agent
7cc3a350cd Add timestamped file logging for QC datasheet creation
Log every create_datasheet outcome (success, skip, validation/backend
errors with traceback) to a dated append-only log file so CLI and web
UI share one audit trail.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-08-08 10:31:23 +00:00
34a68b4e22 Merge pull request #14 from s-diaco/cursor/ui-version-label-b26a
Show package version in window title and UI footer
2026-08-08 12:41:07 +03:30
61f1a737a4 Merge pull request #13 from s-diaco/cursor/prefer-usr-bin-python3-b26a
Prefer /usr/bin/python3 over PATH uv-managed interpreters
2026-08-08 12:40:46 +03:30
f0a004b637 Merge pull request #12 from s-diaco/cursor/linux-system-python-gi-b26a
Force Linux venv onto OS Python so apt _gi loads
2026-08-08 12:40:27 +03:30
7e305f18be Merge pull request #11 from s-diaco/cursor/linux-native-system-gi-b26a
Fix Linux native window falling back to browser
2026-08-08 12:40:05 +03:30
6b2d13272f Merge pull request #10 from s-diaco/cursor/new-qc-sheet-branding-b26a
Brand UI, shortcut, and exe as New QC Sheet
2026-08-08 12:39:50 +03:30
8f5d0d24c9 Merge pull request #9 from s-diaco/cursor/linux-native-deps-b26a
Document Linux native-window system deps and fall back
2026-08-08 12:39:30 +03:30
911e6f3612 Merge pull request #8 from s-diaco/cursor/uv-latest-deps-b26a
Migrate to uv and upgrade dependencies to latest
2026-08-08 12:39:17 +03:30
0fc5eecfb4 Merge pull request #7 from s-diaco/cursor/icon-excel-focus-b26a
Add modern Desktop icon and bring Excel to front
2026-08-08 12:38:56 +03:30
b389a13add Merge pull request #6 from s-diaco/cursor/native-app-window-b26a
Open UI in a single native app window
2026-08-08 12:38:35 +03:30
5fb66a2794 Merge pull request #5 from s-diaco/cursor/uv-install-b26a
Standardize install and packaging on uv
2026-08-08 12:38:02 +03:30
9e317e41df Merge pull request #4 from s-diaco/cursor/desktop-launcher-b26a
Add desktop shortcut and Windows exe packaging
2026-08-08 12:37:34 +03:30
d5f1a563e2 Merge pull request #3 from s-diaco/cursor/nicegui-web-ui-b26a
Add NiceGUI web UI for datasheet selection
2026-08-08 12:37:13 +03:30
a9f1e90fc1 Merge pull request #2 from s-diaco/cursor/cross-platform-ooxml-b26a
Add cross-platform Linux + Windows Excel clean support
2026-08-08 12:36:43 +03:30
Cursor Agent
0bca5e551e Show package version in window title and muted UI footer
Read xlsx-clean version from package metadata and display it as
"New QC Sheet · X.Y.Z" in the title and "vX.Y.Z" under Create, without
changing the 900x700 native window size.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-07-25 07:06:03 +00:00
7f60185536 Merge pull request 'Prefer /usr/bin/python3 over PATH uv-managed interpreters' (#4) from cursor/prefer-usr-bin-python3-b26a into main 2026-07-25 06:03:21 +00:00
Cursor Agent
3463fb74df Prefer /usr/bin/python3 over PATH uv-managed interpreters
setup_linux.sh used command -v python3, which with an activated .venv or
uv on PATH resolved to ~/.local/share/uv/python/... and failed the gi
preflight even though apt python3-gi was installed. Always use
/usr/bin/python3 for the native-window venv.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-07-25 06:03:16 +00:00
c38d9a93be Merge pull request 'Force Linux venv onto OS Python so apt _gi loads' (#3) from cursor/linux-system-python-gi-b26a into main 2026-07-25 05:59:05 +00:00
Cursor Agent
0e0a2c5e62 Note .python-version minor pin in AGENTS.md
Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-07-25 05:55:10 +00:00
Cursor Agent
b9ea8b2d36 Force Linux venv onto OS Python so apt _gi loads
uv was recreating .venv with managed CPython 3.12.2 (from .python-version),
which cannot import apt python3-gi's _gi. Pin .python-version to 3.12, create
and sync the venv with --no-managed-python using /usr/bin/python3, fail setup
if GTK is still unusable, and document the ABI mismatch.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-07-25 05:54:59 +00:00
cf08d35767 Merge pull request 'cursor/linux-native-system-gi-b26a' (#2) from cursor/linux-native-system-gi-b26a into main
Reviewed-on: #2
2026-07-25 05:31:16 +00:00
Cursor Agent
ba1231c73d Add Linux setup script and clearer native-window diagnostics
Provide desktop/setup_linux.sh for apt + system-site-packages uv venv,
point docs at it, and print Python version plus the real gi/typelib error
when falling back to the browser.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-07-22 11:22:09 +00:00
Cursor Agent
63bd3b0f0e Tighten Linux native fallback hint text
Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-07-22 11:09:58 +00:00
Cursor Agent
a70793f61a Fix Linux native window when uv venv hides system PyGObject
Isolated uv venvs cannot import apt-installed python3-gi, so native mode
always fell back to the browser. Append system dist-packages and verify
Gtk/WebKit typelibs before deciding native mode is unavailable; document
uv venv --system-site-packages as the durable install option.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-07-22 11:09:54 +00:00
Cursor Agent
d1e817f4ac Brand operator UI, shortcut, and exe as New QC Sheet
Keep the xlsx_clean package name; show New QC Sheet in the web window
title/heading, Desktop shortcut, and Windows PyInstaller output.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-07-22 11:03:16 +00:00
Cursor Agent
dc097a2da4 Document Linux GTK deps for native window and fall back
Native single-window mode on Linux needs apt GTK/WebKit packages that
uv cannot install. Document them in README/AGENTS, and auto-fall back
to the browser with a clear hint when those libs are missing.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-07-22 10:59:14 +00:00
Cursor Agent
aab7afee37 Migrate from rye to uv and bump deps to latest
Drop rye lockfiles and [tool.rye], add uv.lock, and resolve current
latest packages (pandas 3, beaupy 3.12, etc.). Setup/build scripts use
uv sync.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-07-22 10:34:50 +00:00
Cursor Agent
d07c4b6ca2 Wire Desktop shortcut scripts to use the new icon asset
Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-07-22 09:51:32 +00:00
Cursor Agent
d46fe5b6a4 Add modern Desktop icon and bring Excel to front on COM save
Ship a multi-size teal spreadsheet ICO for shortcuts/exe, and after COM
SaveAs maximize Excel and force it to the foreground over the app window.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-07-22 09:51:18 +00:00
Cursor Agent
5c6451c32a Open UI in a single native app window by default
Use NiceGUI native mode (pywebview) instead of the default browser so
Desktop launchers get one dedicated window without existing tabs.
Add --browser / --no-browser overrides.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-07-22 09:08:29 +00:00
Cursor Agent
71c269b9f0 Standardize install and packaging scripts on uv
Add Setup.bat for one-click Windows uv venv/install/shortcut, switch
build_windows_exe.bat to uv, and document uv as the primary install path.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-07-22 08:35:14 +00:00
Cursor Agent
ff9d35f488 Rewrite README for operator-first desktop usage
Lead with the Desktop icon quick start, then admin install, backends,
and developer CLI/web commands.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-07-22 08:24:33 +00:00
Cursor Agent
afec00b50f Add desktop shortcut and Windows exe packaging
Operators can double-click XlsxClean without using the terminal: Windows
VBS/BAT launchers plus Install-DesktopShortcut, Linux .desktop installer,
and a PyInstaller spec/build script for a standalone Windows exe.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-07-22 08:12:44 +00:00
Cursor Agent
1be0c3ca0f Add NiceGUI web UI for set/ink/serial selection
Extract shared create_datasheet() for CLI and web. New xlsx-clean-web
entry point serves a local NiceGUI form with cascading dropdowns while
keeping the existing CLI.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-07-22 07:56:12 +00:00
Cursor Agent
2cfd530ced Add cross-platform OOXML backend alongside Windows Excel COM
Linux/macOS default to surgical zip edits that clear/set cells while
preserving queries, styles, and other non-worksheet parts. Windows keeps
the COM + add-in path. Paths remapped via XLSX_CLEAN_ROOT; pywin32 is
Windows-only.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-07-22 06:33:43 +00:00
4fdcd9c329 docs: add AGENTS.md with Cursor Cloud dev environment instructions (#1)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
2026-07-22 09:33:43 +03:30
33 changed files with 2230 additions and 242 deletions

75
.github/workflows/bump-version.yml vendored Normal file
View File

@@ -0,0 +1,75 @@
# Manually bump package version and open a PR to main.
# Actions → Bump version → Run workflow → choose patch / minor / major.
name: Bump version
on:
workflow_dispatch:
inputs:
part:
description: Version part to bump
required: true
type: choice
options:
- patch
- minor
- major
default: patch
permissions:
contents: write
pull-requests: write
concurrency:
group: bump-version
cancel-in-progress: false
jobs:
bump:
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Bump version
id: bump
run: |
set -euo pipefail
OLD=$(uvx --from bump-my-version bump-my-version show current_version)
uvx --from bump-my-version bump-my-version bump "${{ inputs.part }}" --no-commit --no-tag
NEW=$(uvx --from bump-my-version bump-my-version show current_version)
echo "old=${OLD}" >> "$GITHUB_OUTPUT"
echo "new=${NEW}" >> "$GITHUB_OUTPUT"
echo "Bumped ${OLD} → ${NEW} (${{ inputs.part }})"
- name: Create pull request
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
OLD="${{ steps.bump.outputs.old }}"
NEW="${{ steps.bump.outputs.new }}"
BRANCH="chore/bump-version-${NEW}"
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git checkout -b "$BRANCH"
git add pyproject.toml
git commit -m "Bump version: ${OLD} → ${NEW}"
git push -u origin "$BRANCH"
gh pr create \
--base main \
--head "$BRANCH" \
--title "Bump version to ${NEW}" \
--body "## Summary
Automated \`${{ inputs.part }}\` bump: \`${OLD}\` → \`${NEW}\`.
Source: \`[project].version\` in \`pyproject.toml\` (via bump-my-version)."

42
.github/workflows/mirror-to-gitea.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
# Mirror all branches and tags from GitHub → Gitea after every ref change.
# Requires repo secret GITEA_TOKEN (Gitea PAT with write:repository on rhino/xlsx-clean).
name: Mirror to Gitea
on:
push:
delete:
create:
workflow_dispatch:
concurrency:
group: mirror-to-gitea
cancel-in-progress: true
jobs:
mirror:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Mirror repository to Gitea
env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
if [ -z "${GITEA_TOKEN:-}" ]; then
echo "Missing secret GITEA_TOKEN (Gitea PAT with write:repository)." >&2
exit 1
fi
git clone --mirror \
"https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" \
mirror.git
cd mirror.git
# Push only branches/tags. Never push GitHub refs/pull/* — Gitea
# rejects those with "hook declined" and fails the whole mirror.
git push --prune \
"https://rhino:${GITEA_TOKEN}@git.faryad.top/rhino/xlsx-clean.git" \
"+refs/heads/*:refs/heads/*" \
"+refs/tags/*:refs/tags/*"

View File

@@ -1 +1 @@
3.12.2
3.12

63
AGENTS.md Normal file
View File

@@ -0,0 +1,63 @@
# xlsx-clean
`xlsx-clean` generates a new Excel QC datasheet from the most recent workbook in a
configured directory, clearing/resetting specific cells. Interfaces:
- CLI: `src/xlsx_clean/clean_cells.py` (`beaupy`)
- GUI: `src/xlsx_clean/gui_app.py` (Dear PyGui cross-platform desktop window)
## Backends
- **`com` (Windows default):** Microsoft Excel COM via `pywin32`. Loads add-ins listed
in `strings.txt`, edits cells, `SaveAs`, leaves Excel visible/maximized and brought
to the front.
- **`ooxml` (Linux/macOS default):** Surgical edit of the `.xlsx` zip (worksheet XML
only). Preserves non-worksheet parts (styles, connections/Power Query definitions,
drawings, etc.). Does not calculate formulas or refresh queries.
Select with `--backend com|ooxml` (CLI) or the Backend dropdown (GUI).
## Cursor Cloud specific instructions
### Platform notes
- `pywin32` has no Linux wheels and is declared as Windows-only
(`pywin32>=312; sys_platform == 'win32'`). It is intentionally **not** installed here.
- End-to-end COM automation needs Windows + desktop Excel and does not run on this VM.
- On Linux, the **ooxml** backend can clear/set cells and write a new workbook when
sample files and `XLSX_CLEAN_ROOT` point at a real tree. Without those data files,
interactive selection still works for config loading, but globbing finds no templates.
- The Dear PyGui GUI runs cross-platform with no system dependencies beyond Python.
On headless VMs without a display server the GUI cannot open a window.
### Environment
- Prefer **uv** for all installs (`uv` in `~/.local/bin`, on PATH via `~/.bashrc`).
- Rye is **not** used (`requirements.lock` removed). Use `uv.lock` + `uv sync`.
```bash
# Linux desktop (deps + Desktop shortcut):
./desktop/setup_linux.sh
# Deps only (any OS):
uv sync
```
- Run Python via the venv interpreter: `.venv/bin/python`.
- Optional: `XLSX_CLEAN_ROOT` remaps `D:\OpenCloud\...` paths from `file_data.csv`.
- Note: the `uv`-created `.venv` does not include `pip`; use `uv pip ...` / `uv sync`
for package operations.
### Lint / test / build
- There is **no lint config, no test suite, and no build step** in this repo (no ruff/flake8,
no pytest, no CI). Don't invent one unless asked.
- `pyproject.toml` uses `hatchling` as the build backend; there is nothing to "build" for dev.
### Running / verifying
- CLI: `.venv/bin/python -m xlsx_clean.clean_cells` (defaults to `ooxml` on Linux).
- GUI: `.venv/bin/python -m xlsx_clean.gui_app`.
- Linux setup: `./desktop/setup_linux.sh` (uv sync + shortcut).
- Desktop shortcut (Linux): `.venv/bin/python desktop/install_desktop_shortcut.py`
- Windows shop-floor: double-click `desktop/Setup.bat` (uv sync + shortcut), or build
an exe with `desktop/build_windows_exe.bat` **on a Windows PC** (cannot build Windows
exe here).
- Sanity-check imports:
`.venv/bin/python -c "import dearpygui, beaupy; from xlsx_clean import hello; from xlsx_clean.core import load_config, list_sets; from xlsx_clean.ooxml_backend import expand_a1_range; print(hello(), expand_a1_range('A1:B2'))"`.

136
README.md
View File

@@ -1,3 +1,137 @@
# xlsx-clean
Create a new xlsx file from the last file in a dir and clear specified cells.
Operator-facing name: **New QC Sheet**.
Create a new QC datasheet from the latest matching workbook: clear configured cells,
blank notes, write the batch serial, and save under a new `[SERIAL]` name.
Everyday use is a **Desktop icon** that opens a **single app window**
(Set -> Ink -> Serial -> Create).
No terminal commands are required for operators.
## Quick start (Windows operators)
1. One-time setup (IT / first install): install [uv](https://docs.astral.sh/uv/getting-started/installation/), clone/copy this project, then double-click
**`desktop\Setup.bat`**
2. Every day: double-click the **New QC Sheet** icon on the Desktop
3. In the app window: choose **Set**, **Ink color**, enter **Serial**, click **Create datasheet**
`Setup.bat` creates `.venv` with uv, installs the package, and adds the Desktop shortcut
(using the modern icon in `desktop\xlsx-clean.ico`).
The shortcut runs `desktop\XlsxClean.vbs` which launches the GUI window.
Closing that window stops the app.
When you **Create** with the **com** backend, Excel is maximized and brought to the front
after the new workbook is saved.
If something fails, use **`desktop\XlsxClean.bat`** instead - it shows a console with errors.
## Standalone Windows exe (optional)
To put a self-contained app on other PCs (build **on Windows**):
1. Install [uv](https://docs.astral.sh/uv/getting-started/installation/) if needed
2. Double-click **`desktop\build_windows_exe.bat`**
3. It creates `dist\New QC Sheet\New QC Sheet.exe` and a Desktop shortcut
4. Copy the whole **`dist\New QC Sheet\`** folder when moving to another machine (keep files together)
## What the app does
| Step | Action |
|------|--------|
| 1 | Find the latest matching workbook in the product folder |
| 2 | Clear configured cells / blank notes |
| 3 | Write the batch serial |
| 4 | Save as a new file using the `[SERIAL]` name pattern |
### Excel backends
| Platform | Default | Notes |
|----------|---------|--------|
| Windows | `com` | Uses Microsoft Excel + add-ins from `strings.txt`; leaves Excel open |
| Linux / macOS | `ooxml` | Surgical `.xlsx` edit; keeps formulas, formatting, and queries on disk |
Choose the backend in the `config.toml` file, or override with CLI `--backend com|ooxml`.
**Limits of `ooxml`:** does not refresh Power Query, calculate formulas, or load `.xlam`/`.xla`
add-ins. Open the file in Excel afterward for refresh/calc. Prefer **`com` on Windows** when
you need add-ins and a live Excel session.
## First-time install (admins)
Uses **uv** only (no pip / no rye). Install uv once:
https://docs.astral.sh/uv/getting-started/installation/
**Windows (recommended):** double-click **`desktop\Setup.bat`**
**Linux (recommended):** from the project root:
```bash
chmod +x desktop/setup_linux.sh
./desktop/setup_linux.sh
```
That runs `uv sync` and creates a Desktop shortcut.
**Manual / macOS:**
```bash
uv sync
```
That creates `.venv` and installs locked deps from `uv.lock`.
Before building the standalone exe:
```bash
uv sync --extra desktop
```
Then create the Desktop shortcut (if you did not use `Setup.bat`):
- **Windows:** double-click `desktop\Install-DesktopShortcut.bat`
- **Linux:** `./desktop/setup_linux.sh` (preferred), or
`.venv/bin/python desktop/install_desktop_shortcut.py`
Optional: Edit `~/.xlsx-clean/config.toml` (created automatically on first run) if workbooks are not under the default `D:\\OpenCloud` paths.
## Developer interfaces
These are optional; operators should use the Desktop icon.
**GUI (desktop window)**
```bash
.venv/bin/python -m xlsx_clean.gui_app
# Windows: .venv\Scripts\python.exe -m xlsx_clean.gui_app
```
**CLI**
```bash
.venv/bin/python -m xlsx_clean.clean_cells --backend ooxml
```
Windows CLI helper: `src\xlsx_clean\new_xslx.bat`
## Config files
| File | Purpose |
|------|---------|
| `config.toml` | Backend choice and root directory path for each set (auto-generated in `~/.xlsx-clean/` on first run) |
| `src/xlsx_clean/file_data.csv` | Relative product folders, filename patterns, cells to clear/set |
| `src/xlsx_clean/strings.txt` | UI prompts + Windows Excel add-in paths (`com` only) |
## Project layout (launchers)
| Path | Purpose |
|------|---------|
| `desktop/xlsx-clean.ico` | Modern Windows Desktop / exe icon |
| `desktop/Setup.bat` | Windows one-time setup via uv + Desktop shortcut |
| `desktop/setup_linux.sh` | Linux one-time setup (uv sync + shortcut) |
| `desktop/Install-DesktopShortcut.bat` | Create Desktop icon only (Windows) |
| `desktop/XlsxClean.vbs` | Silent double-click launcher |
| `desktop/XlsxClean.bat` | Launcher with visible console |
| `desktop/build_windows_exe.bat` | Build standalone `New QC Sheet.exe` with uv |
| `desktop/install_desktop_shortcut.py` | Create Desktop shortcut (Linux) |
| `packaging/xlsx_clean.spec` | PyInstaller spec |

View File

@@ -0,0 +1,13 @@
@echo off
REM Create a Desktop shortcut that points at desktop\XlsxClean.vbs
setlocal
cd /d "%~dp0\.."
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0Install-DesktopShortcut.ps1"
if errorlevel 1 (
echo Failed to create desktop shortcut.
pause
exit /b 1
)
echo Desktop shortcut created: New QC Sheet
pause

View File

@@ -0,0 +1,29 @@
# Creates %USERPROFILE%\Desktop\New QC Sheet.lnk -> desktop\XlsxClean.vbs
$ErrorActionPreference = "Stop"
$repoRoot = Split-Path -Parent $PSScriptRoot
$target = Join-Path $PSScriptRoot "XlsxClean.vbs"
$desktop = [Environment]::GetFolderPath("Desktop")
$shortcutPath = Join-Path $desktop "New QC Sheet.lnk"
if (-not (Test-Path $target)) {
throw "Launcher not found: $target"
}
# Remove older shortcut name if present
$legacy = Join-Path $desktop "XlsxClean.lnk"
if (Test-Path $legacy) {
Remove-Item $legacy -Force
}
$wsh = New-Object -ComObject WScript.Shell
$shortcut = $wsh.CreateShortcut($shortcutPath)
$shortcut.TargetPath = $target
$shortcut.WorkingDirectory = $repoRoot
$shortcut.WindowStyle = 7
$shortcut.Description = "Open New QC Sheet"
$iconCandidate = Join-Path $PSScriptRoot "xlsx-clean.ico"
if (Test-Path $iconCandidate) {
$shortcut.IconLocation = "$iconCandidate,0"
}
$shortcut.Save()
Write-Host "Created $shortcutPath"

33
desktop/Setup.bat Normal file
View File

@@ -0,0 +1,33 @@
@echo off
REM One-time Windows setup with uv: sync deps from uv.lock, Desktop shortcut.
setlocal
cd /d "%~dp0\.."
where uv >nul 2>&1
if errorlevel 1 (
echo uv was not found on PATH.
echo Install uv from https://docs.astral.sh/uv/getting-started/installation/
echo then re-run this script.
pause
exit /b 1
)
echo Syncing project with uv (creates .venv if needed)...
uv sync
if errorlevel 1 (
echo uv sync failed.
pause
exit /b 1
)
echo Creating Desktop shortcut...
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0Install-DesktopShortcut.ps1"
if errorlevel 1 (
echo Desktop shortcut step failed.
pause
exit /b 1
)
echo.
echo Setup complete. Double-click the New QC Sheet icon on your Desktop.
pause

10
desktop/XlsxClean.bat Normal file
View File

@@ -0,0 +1,10 @@
@echo off
REM Double-click launcher with visible console (useful for troubleshooting).
setlocal
cd /d "%~dp0\.."
if exist ".venv\Scripts\python.exe" (
".venv\Scripts\python.exe" -m xlsx_clean.gui_app %*
) else (
py -3 -m xlsx_clean.gui_app %*
)

28
desktop/XlsxClean.vbs Normal file
View File

@@ -0,0 +1,28 @@
' XlsxClean.vbs - double-click launcher (no console window)
' Resolves repo root from this script's folder (desktop\ -> repo root).
Option Explicit
Dim fso, sh, scriptDir, root, pythonExe, cmd
Set fso = CreateObject("Scripting.FileSystemObject")
Set sh = CreateObject("WScript.Shell")
scriptDir = fso.GetParentFolderName(WScript.ScriptFullName)
root = fso.GetParentFolderName(scriptDir)
' Prefer project venv, then py launcher, then python on PATH.
pythonExe = root & "\.venv\Scripts\pythonw.exe"
If Not fso.FileExists(pythonExe) Then
pythonExe = root & "\.venv\Scripts\python.exe"
End If
If Not fso.FileExists(pythonExe) Then
pythonExe = "py"
End If
sh.CurrentDirectory = root
' Window style 0 = hidden.
cmd = """" & pythonExe & """ -m xlsx_clean.gui_app"
If pythonExe = "py" Then
cmd = "py -3 -m xlsx_clean.gui_app"
End If
sh.Run cmd, 0, False

View File

@@ -0,0 +1,56 @@
@echo off
REM Build dist\New QC Sheet\New QC Sheet.exe on Windows with uv, then Desktop shortcut.
setlocal
cd /d "%~dp0\.."
where uv >nul 2>&1
if errorlevel 1 (
echo uv was not found on PATH.
echo Install uv from https://docs.astral.sh/uv/getting-started/installation/
pause
exit /b 1
)
echo Syncing project + desktop extras with uv...
uv sync --extra desktop
if errorlevel 1 (
echo uv sync failed.
pause
exit /b 1
)
echo Building executable with PyInstaller...
uv run pyinstaller --noconfirm packaging\xlsx_clean.spec
if errorlevel 1 (
echo PyInstaller build failed.
pause
exit /b 1
)
set EXE=%CD%\dist\New QC Sheet\New QC Sheet.exe
if not exist "%EXE%" (
echo Expected exe not found: %EXE%
pause
exit /b 1
)
echo Creating Desktop shortcut to the exe...
powershell -NoProfile -ExecutionPolicy Bypass -Command ^
"$desk=[Environment]::GetFolderPath('Desktop');" ^
"$lnk=Join-Path $desk 'New QC Sheet.lnk';" ^
"$legacy=Join-Path $desk 'XlsxClean.lnk';" ^
"if (Test-Path $legacy) { Remove-Item $legacy -Force };" ^
"$ico=Join-Path '%CD%' 'desktop\xlsx-clean.ico';" ^
"$w=New-Object -ComObject WScript.Shell;" ^
"$s=$w.CreateShortcut($lnk);" ^
"$s.TargetPath='%EXE%';" ^
"$s.WorkingDirectory='%~dp0..\dist\New QC Sheet';" ^
"$s.Description='Open New QC Sheet';" ^
"if (Test-Path $ico) { $s.IconLocation = $ico };" ^
"$s.Save();" ^
"Write-Host Created $lnk"
echo.
echo Done. Double-click the New QC Sheet icon on your Desktop.
echo Exe folder: dist\New QC Sheet\
pause

View File

@@ -0,0 +1,80 @@
"""Install a Desktop shortcut that launches New QC Sheet."""
from __future__ import annotations
import os
import subprocess
import sys
from pathlib import Path
REPO_ROOT = Path(__file__).resolve().parents[1]
DESKTOP_DIR = Path(__file__).resolve().parent
APP_DISPLAY_NAME = "New QC Sheet"
def _user_desktop() -> Path:
if sys.platform == "win32":
return Path(os.environ.get("USERPROFILE", str(Path.home()))) / "Desktop"
# Linux / macOS
xdg = os.environ.get("XDG_DESKTOP_DIR")
if xdg:
return Path(xdg)
return Path.home() / "Desktop"
def install_windows() -> Path:
ps1 = DESKTOP_DIR / "Install-DesktopShortcut.ps1"
subprocess.run(
[
"powershell",
"-NoProfile",
"-ExecutionPolicy",
"Bypass",
"-File",
str(ps1),
],
check=True,
)
return _user_desktop() / f"{APP_DISPLAY_NAME}.lnk"
def install_linux() -> Path:
desktop = _user_desktop()
desktop.mkdir(parents=True, exist_ok=True)
python = REPO_ROOT / ".venv" / "bin" / "python"
if not python.is_file():
python = Path(sys.executable)
out = desktop / f"{APP_DISPLAY_NAME}.desktop"
legacy = desktop / "XlsxClean.desktop"
if legacy.is_file():
legacy.unlink()
exec_line = f"{python} -m xlsx_clean.gui_app"
icon_png = DESKTOP_DIR / "xlsx-clean.png"
icon_line = str(icon_png) if icon_png.is_file() else "applications-office"
content = f"""[Desktop Entry]
Type=Application
Version=1.0
Name={APP_DISPLAY_NAME}
Comment=Create a new QC datasheet
Exec={exec_line}
Path={REPO_ROOT}
Icon={icon_line}
Terminal=false
Categories=Office;
StartupNotify=true
"""
out.write_text(content, encoding="utf-8")
out.chmod(out.stat().st_mode | 0o111)
return out
def main() -> None:
if sys.platform == "win32":
path = install_windows()
else:
path = install_linux()
print(f"Desktop shortcut created: {path}")
if __name__ == "__main__":
main()

23
desktop/setup_linux.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
# Operator setup for New QC Sheet on Linux desktops.
# Installs deps with uv and creates a Desktop shortcut.
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT"
if ! command -v uv >/dev/null 2>&1; then
echo "uv not found on PATH. Install uv first: https://docs.astral.sh/uv/" >&2
exit 1
fi
echo "Syncing dependencies..."
uv sync
echo "Installing Desktop shortcut..."
.venv/bin/python desktop/install_desktop_shortcut.py
echo
echo "Done. Launch with:"
echo " .venv/bin/python -m xlsx_clean.gui_app"
echo "or use the Desktop shortcut."

View File

@@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
Version=1.0
Name=New QC Sheet
Comment=Create a new QC datasheet
# Exec is filled by install_desktop_shortcut.py; placeholder for manual edits:
Exec=bash -lc 'cd "$(dirname "%k")/.." && .venv/bin/python -m xlsx_clean.gui_app'
Path=
Icon=applications-office
Terminal=false
Categories=Office;
StartupNotify=true

BIN
desktop/xlsx-clean.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
desktop/xlsx-clean.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

82
packaging/xlsx_clean.spec Normal file
View File

@@ -0,0 +1,82 @@
# -*- mode: python ; coding: utf-8 -*-
"""PyInstaller spec for a double-clickable New QC Sheet executable.
Build on Windows (recommended for shop-floor PCs):
desktop\\build_windows_exe.bat
Or manually:
pyinstaller packaging/xlsx_clean.spec
"""
from PyInstaller.utils.hooks import collect_all
block_cipher = None
datas = [
("src/xlsx_clean/file_data.csv", "xlsx_clean"),
("src/xlsx_clean/strings.txt", "xlsx_clean"),
("src/xlsx_clean/fonts", "xlsx_clean/fonts"),
]
binaries = []
hiddenimports = [
"xlsx_clean",
"xlsx_clean.core",
"xlsx_clean.gui_app",
"xlsx_clean.clean_cells",
"xlsx_clean.ooxml_backend",
"xlsx_clean.com_backend",
"xlsx_clean.paths",
]
tmp_ret = collect_all("dearpygui")
datas += tmp_ret[0]
binaries += tmp_ret[1]
hiddenimports += tmp_ret[2]
a = Analysis(
["src/xlsx_clean/gui_app.py"],
pathex=["."],
binaries=binaries,
datas=datas,
hiddenimports=hiddenimports,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name="New QC Sheet",
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon="desktop/xlsx-clean.ico",
)
coll = COLLECT(
exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name="New QC Sheet",
)

View File

@@ -1,28 +1,58 @@
[project]
name = "xlsx-clean"
version = "0.1.0"
description = "Add your description here"
version = "1.0.0"
description = "Create a new QC datasheet from the latest matching workbook"
authors = [
{ name = "Diaco Soltanpour", email = "dyaco8464@yahoo.com" }
]
dependencies = [
"beaupy>=3.8.2",
"pandas>=2.2.2",
"pywin32>=306",
"beaupy>=3.12.0",
"dearpygui>=2.0.0",
"pywin32>=312; sys_platform == 'win32'",
]
readme = "README.md"
requires-python = ">= 3.12"
requires-python = ">=3.12"
[project.scripts]
xlsx-clean = "xlsx_clean.clean_cells:main"
xlsx-clean-gui = "xlsx_clean.gui_app:main"
[project.optional-dependencies]
desktop = [
"pyinstaller>=6.21.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.rye]
managed = true
dev-dependencies = []
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = ["src/xlsx_clean"]
[tool.hatch.build.targets.wheel.force-include]
"src/xlsx_clean/file_data.csv" = "xlsx_clean/file_data.csv"
"src/xlsx_clean/strings.txt" = "xlsx_clean/strings.txt"
"src/xlsx_clean/new_xslx.bat" = "xlsx_clean/new_xslx.bat"
"src/xlsx_clean/fonts" = "xlsx_clean/fonts"
[tool.uv]
package = true
# Version bumps: `uvx bump-my-version bump patch|minor|major`
# current_version falls back to [project].version above.
[tool.bumpversion]
commit = false
tag = false
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
message = "Bump version: {current_version} → {new_version}"
tag_name = "v{new_version}"
tag_message = "Bump version: {current_version} → {new_version}"
[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'

View File

@@ -1,42 +0,0 @@
# generated by rye
# use `rye lock` or `rye sync` to update this lockfile
#
# last locked with the following flags:
# pre: false
# features: []
# all-features: false
# with-sources: false
-e file:.
beaupy==3.8.2
# via xlsx-clean
emoji==2.11.0
# via beaupy
markdown-it-py==3.0.0
# via rich
mdurl==0.1.2
# via markdown-it-py
numpy==1.26.4
# via pandas
pandas==2.2.2
# via xlsx-clean
pygments==2.17.2
# via rich
python-dateutil==2.9.0.post0
# via pandas
python-yakh==0.3.2
# via beaupy
# via questo
pytz==2024.1
# via pandas
pywin32==306
# via xlsx-clean
questo==0.2.3
# via beaupy
rich==13.7.1
# via beaupy
# via questo
six==1.16.0
# via python-dateutil
tzdata==2024.1
# via pandas

View File

@@ -1,42 +0,0 @@
# generated by rye
# use `rye lock` or `rye sync` to update this lockfile
#
# last locked with the following flags:
# pre: false
# features: []
# all-features: false
# with-sources: false
-e file:.
beaupy==3.8.2
# via xlsx-clean
emoji==2.11.0
# via beaupy
markdown-it-py==3.0.0
# via rich
mdurl==0.1.2
# via markdown-it-py
numpy==1.26.4
# via pandas
pandas==2.2.2
# via xlsx-clean
pygments==2.17.2
# via rich
python-dateutil==2.9.0.post0
# via pandas
python-yakh==0.3.2
# via beaupy
# via questo
pytz==2024.1
# via pandas
pywin32==306
# via xlsx-clean
questo==0.2.3
# via beaupy
rich==13.7.1
# via beaupy
# via questo
six==1.16.0
# via python-dateutil
tzdata==2024.1
# via pandas

View File

@@ -0,0 +1,4 @@
from xlsx_clean.clean_cells import main
if __name__ == "__main__":
main()

View File

@@ -0,0 +1,50 @@
"""Append-only file logging for QC datasheet creation."""
from __future__ import annotations
import logging
import os
import sys
from pathlib import Path
_LOGGER_NAME = "xlsx_clean.create"
_configured = False
def default_log_path() -> Path:
"""Resolve the log file path.
Order:
1. ``XLSX_CLEAN_LOG`` env var (file path)
2. Next to the frozen executable (PyInstaller)
3. ``~/.xlsx-clean/xlsx-clean.log``
"""
env = os.environ.get("XLSX_CLEAN_LOG")
if env:
return Path(env)
if getattr(sys, "frozen", False):
return Path(sys.executable).resolve().parent / "xlsx-clean.log"
return Path.home() / ".xlsx-clean" / "xlsx-clean.log"
def get_logger() -> logging.Logger:
"""Return a logger that appends timestamped lines to the log file."""
global _configured
logger = logging.getLogger(_LOGGER_NAME)
if not _configured:
log_path = default_log_path()
log_path.parent.mkdir(parents=True, exist_ok=True)
handler = logging.FileHandler(log_path, encoding="utf-8")
handler.setFormatter(
logging.Formatter(
fmt="%(asctime)s %(levelname)s %(message)s",
datefmt="%Y-%m-%d %H:%M:%S",
)
)
logger.addHandler(handler)
logger.setLevel(logging.INFO)
logger.propagate = False
_configured = True
return logger

View File

@@ -1,136 +1,107 @@
from datetime import datetime
import pathlib
import shutil
"""Interactive CLI: select set/ink/serial, create a cleaned QC workbook."""
from __future__ import annotations
import argparse
import pandas
from beaupy import prompt, select
# from openpyxl import load_workbook
from rich.console import Console
import win32com.client as win32
NEW_VALUE = ""
# import questionary
# load questions from text file
with open("strings.txt") as f:
content = f.readlines()
# remove whitespace characters like `\n` at the end of each line
content = [x.strip() for x in content]
q1 = content[0]
q2 = content[1]
q3 = content[2]
path_df = pandas.read_csv("file_data.csv")
path_df["set_dir"] = [pathlib.Path(path).parent.parent for path in path_df["dir"]]
path_list = [pathlib.Path(path) for path in path_df["dir"]]
parent_path = list(
path_df.drop_duplicates(subset=["set_name"], keep="first")["set_name"]
from xlsx_clean.core import (
create_datasheet,
list_ink_colors,
list_sets,
load_config,
)
# get parent path index
console = Console()
console.print(q1)
selected_set = select(parent_path, cursor_style="cyan")
console.print(q2)
selected_dir = select(
[
pathlib.Path(path).stem
for path in list(path_df[path_df["set_name"] == selected_set]["dir"])
]
)
console.print(f"Selected: {selected_dir}")
path_ = pathlib.Path(
path_df[
(path_df["set_name"] == selected_set)
& (path_df["dir"].str.endswith(selected_dir))
]["dir"].iloc[0]
)
pattern = path_df[
(path_df["set_name"] == selected_set) & (path_df["dir"].str.endswith(selected_dir))
]["pattern"].iloc[0]
search_pattern = pattern.replace("[SERIAL]", "*")
names = path_.glob(search_pattern)
files = [str(x) for x in names if x.is_file()]
batch_serial = 0
# Prompt for serial
batch_serial = prompt(q3, target_type=str)
from xlsx_clean.paths import default_backend, resolve_backend
def find_last_workbook(files):
# Sort the list of files by their names
sorted_files = sorted(files)
# The last file will be the one at the end of the sorted list
last_file = sorted_files[-1]
return last_file
def parse_args(argv: list[str] | None = None) -> argparse.Namespace:
parser = argparse.ArgumentParser(
description=(
"Create a new QC datasheet from the latest matching workbook, "
"clearing configured cells and writing the batch serial."
)
)
parser.add_argument(
"--backend",
choices=("com", "ooxml"),
default=None,
help=(
"Excel edit backend: 'com' (Windows Excel + add-ins) or "
f"'ooxml' (surgical zip edit). Default: {default_backend()} (Overrides config.toml)."
),
)
parser.add_argument(
"--root",
type=str,
default=None,
help="Override the root directory for the selected set.",
)
return parser.parse_args(argv)
def get_workbook_names(files, batch_serial):
last_workbook = find_last_workbook(files)
path_of_the_year = pathlib.Path(str(path_).replace("2025", str(datetime.now().year)))
return last_workbook, path_of_the_year / pattern.replace(
"[SERIAL]", batch_serial.split("/")[0]
def run(argv: list[str] | None = None) -> int:
from pathlib import Path
args = parse_args(argv)
content, rows, config = load_config()
# Validate early so CLI fails fast on unsupported COM.
try:
backend = resolve_backend(args.backend, config.get("backend"))
except (ValueError, RuntimeError) as exc:
Console().print(f"[red]{exc}[/red]")
return 1
q1, q2, q3 = content[0], content[1], content[2]
addin_paths = content[3:5] if len(content) >= 5 else []
console = Console()
console.print(q1)
selected_set = select(list_sets(rows), cursor_style="cyan")
console.print(q2)
selected_dir = select(list_ink_colors(rows, selected_set))
console.print(f"Selected: {selected_dir}")
if args.root:
for r in rows:
if r["set_name"] == selected_set:
r["dir"] = str(Path(args.root) / r["rel_dir"])
batch_serial = prompt(q3, target_type=str)
result = create_datasheet(
selected_set=selected_set,
selected_dir=selected_dir,
batch_serial=batch_serial,
backend=backend,
rows=rows,
addin_paths=addin_paths,
config=config,
)
if result.template is not None:
console.print(f"Selected: {result.template.stem}")
if result.backend is not None:
console.print(f"Backend: {result.backend}")
ref_workbook_name, new_workbook_name = get_workbook_names(files, batch_serial)
# Selected Excel file
console.print(f"Selected: {pathlib.Path(ref_workbook_name).stem}")
# workbook = load_workbook(ref_workbook_name)
temp_workbook = str(pathlib.Path.cwd() / "temp_workbook.xlsx")
shutil.copyfile(ref_workbook_name, temp_workbook)
if result.skipped:
console.print(f"[yellow]{result.message}[/yellow]")
return 0
if not result.ok:
console.print(f"[red]{result.message}[/red]")
return 1
# in case of this error
# AttributeError: module 'win32com.gen_py.00020813-0000-0000-C000-000000000046x0x1x9' has no attribute 'CLSIDToClassMap'
# see https://stackoverflow.com/questions/52889704
excel = win32.gencache.EnsureDispatch("Excel.Application")
excel.Visible = True
console.print(f"[green]{result.message}[/green]")
return 0
# Need to load the addins before opening the workbook
workbook = excel.Workbooks.Open(temp_workbook)
addin_path_1 = content[3]
excel.Workbooks.Open(addin_path_1)
addin_path_2 = content[4]
excel.Workbooks.Open(addin_path_2)
cells_to_clear = path_df[
(path_df["set_name"] == selected_set) & (path_df["dir"].str.endswith(selected_dir))
]["cells_to_clear"].iloc[0]
for workbook_data in cells_to_clear.split(","):
worksheet_data = workbook_data.split("!")
# worksheet = workbook[worksheet_data[0].replace("'", "")]
worksheet = workbook.Worksheets(worksheet_data[0].replace("'", ""))
# TODO: delete
# is_range = len(worksheet_data[1].split(":")) > 1
cell_range = worksheet.Range(worksheet_data[1]).ClearContents()
def main() -> None:
raise SystemExit(run())
cells_to_new_value = path_df[
(path_df["set_name"] == selected_set) & (path_df["dir"].str.endswith(selected_dir))
]["notes_cell"].iloc[0]
for workbook_data in cells_to_new_value.split(","):
worksheet_data = workbook_data.split("!")
# worksheet = workbook[worksheet_data[0].replace("'", "")]
worksheet = workbook.Worksheets(worksheet_data[0].replace("'", ""))
# TODO: delete
# is_range = len(worksheet_data[1].split(":")) > 1
cell_range = worksheet.Range(worksheet_data[1]).Value = NEW_VALUE
serial_cell = path_df[
(path_df["set_name"] == selected_set) & (path_df["dir"].str.endswith(selected_dir))
]["serial_cell"].iloc[0]
for workbook_data in serial_cell.split(","):
worksheet_data = workbook_data.split("!")
worksheet = workbook.Worksheets(worksheet_data[0].replace("'", ""))
cell_range = worksheet.Range(worksheet_data[1])
cell_range.Value = batch_serial
if not new_workbook_name.is_file():
pathlib.Path(new_workbook_name.parents[0]).mkdir(parents=True, exist_ok=True)
workbook.SaveAs(str(new_workbook_name))
excel.WindowState = win32.constants.xlMaximized
# excel.Application.Quit()
# if os.name == "nt":
# os.system(f"start excel.exe \"{new_workbook_name}\"")
if __name__ == "__main__":
main()

View File

@@ -0,0 +1,103 @@
"""Windows Excel COM backend (pywin32). Imported only when selected."""
from __future__ import annotations
from pathlib import Path
def _bring_excel_to_front(excel, workbook) -> None:
"""Maximize and force Excel ahead of other windows (e.g. NiceGUI)."""
import win32com.client as win32
import win32con
import win32gui
excel.Visible = True
excel.WindowState = win32.constants.xlMaximized
try:
workbook.Activate()
except Exception:
pass
try:
hwnd = int(excel.Hwnd)
win32gui.ShowWindow(hwnd, win32con.SW_RESTORE)
win32gui.ShowWindow(hwnd, win32con.SW_MAXIMIZE)
# Allow SetForegroundWindow to succeed when another app has focus.
try:
import win32api
import win32process
fg = win32gui.GetForegroundWindow()
fg_tid, _ = win32process.GetWindowThreadProcessId(fg)
our_tid = win32api.GetCurrentThreadId()
if fg_tid != our_tid:
win32process.AttachThreadInput(our_tid, fg_tid, True)
try:
win32gui.SetForegroundWindow(hwnd)
finally:
win32process.AttachThreadInput(our_tid, fg_tid, False)
else:
win32gui.SetForegroundWindow(hwnd)
except Exception:
win32gui.SetForegroundWindow(hwnd)
except Exception:
# Focus stealing can fail under some Windows policies; create still succeeded.
pass
def clean_workbook_com(
source: Path | str,
destination: Path | str,
cells_to_clear: str,
notes_cell: str,
serial_cell: str,
batch_serial: str,
addin_paths: list[str] | None = None,
notes_value: str = "",
visible: bool = True,
maximize: bool = True,
) -> None:
"""Clear/set cells via Excel COM, SaveAs destination, leave Excel open."""
# Lazy import so Linux never loads pywin32.
import win32com.client as win32
source = Path(source)
destination = Path(destination)
destination.parent.mkdir(parents=True, exist_ok=True)
# AttributeError: ... has no attribute 'CLSIDToClassMap'
# https://stackoverflow.com/questions/52889704
excel = win32.gencache.EnsureDispatch("Excel.Application")
excel.Visible = visible
workbook = excel.Workbooks.Open(str(source.resolve()))
for addin_path in addin_paths or []:
if addin_path:
excel.Workbooks.Open(addin_path)
for workbook_data in cells_to_clear.split(","):
workbook_data = workbook_data.strip()
if not workbook_data:
continue
sheet_name, a1 = workbook_data.split("!", 1)
worksheet = workbook.Worksheets(sheet_name.replace("'", ""))
worksheet.Range(a1).ClearContents()
for workbook_data in notes_cell.split(","):
workbook_data = workbook_data.strip()
if not workbook_data:
continue
sheet_name, a1 = workbook_data.split("!", 1)
worksheet = workbook.Worksheets(sheet_name.replace("'", ""))
worksheet.Range(a1).Value = notes_value
for workbook_data in serial_cell.split(","):
workbook_data = workbook_data.strip()
if not workbook_data:
continue
sheet_name, a1 = workbook_data.split("!", 1)
worksheet = workbook.Worksheets(sheet_name.replace("'", ""))
worksheet.Range(a1).Value = batch_serial
workbook.SaveAs(str(destination.resolve()))
if maximize or visible:
_bring_excel_to_front(excel, workbook)

263
src/xlsx_clean/core.py Normal file
View File

@@ -0,0 +1,263 @@
"""Core business logic for xlsx_clean."""
from __future__ import annotations
import csv
import shutil
import tempfile
from dataclasses import dataclass
from datetime import datetime
from pathlib import Path
import tomllib
from xlsx_clean.app_logging import get_logger
from xlsx_clean.paths import (
default_config_path,
package_file,
resolve_backend,
)
DEFAULT_CONFIG_CONTENT = """\
# Configuration for xlsx_clean
# backend options:
# - "com": Use Microsoft Excel COM (Windows only, keeps Excel visible)
# - "ooxml": Surgical zip edit (Cross-platform, very fast, preserves non-worksheet data)
backend = "com"
[sets]
"Kimia Razi" = "D:\\\\OpenCloud\\\\Kimia Razi"
"inco" = "D:\\\\OpenCloud\\\\inco"
"""
NEW_VALUE = ""
@dataclass(frozen=True)
class CreateResult:
ok: bool
message: str
template: Path | None = None
destination: Path | None = None
backend: str | None = None
skipped: bool = False
def find_last_workbook(files: list[str]) -> str:
return sorted(files)[-1]
def get_workbook_names(
files: list[str],
batch_serial: str,
source_dir: Path,
pattern: str,
) -> tuple[str, Path]:
last_workbook = find_last_workbook(files)
path_of_the_year = Path(str(source_dir).replace("2025", str(datetime.now().year)))
return last_workbook, path_of_the_year / pattern.replace(
"[SERIAL]", batch_serial.split("/")[0]
)
def load_config() -> tuple[list[str], list[dict], dict]:
config_path = default_config_path()
if not config_path.exists():
config_path.parent.mkdir(parents=True, exist_ok=True)
config_path.write_text(DEFAULT_CONFIG_CONTENT, encoding="utf-8")
with open(config_path, "rb") as f:
config = tomllib.load(f)
strings_path = package_file("strings.txt")
with open(strings_path, encoding="utf-8") as f:
content = [line.strip() for line in f.readlines()]
csv_path = package_file("file_data.csv")
rows = []
set_roots = config.get("sets", {})
with open(csv_path, encoding="utf-8") as f:
reader = csv.DictReader(f)
for row in reader:
set_name = row["set_name"]
rel_dir = row["dir"].replace("\\", "/")
row["rel_dir"] = rel_dir
root_str = set_roots.get(set_name, "")
if root_str:
row["dir"] = str(Path(root_str) / rel_dir)
else:
row["dir"] = str(Path(rel_dir))
rows.append(row)
return content, rows, config
def list_sets(rows: list[dict]) -> list[str]:
return list(dict.fromkeys(r["set_name"] for r in rows))
import re
def _sort_key(name: str):
match = re.search(r'\d+', name)
num = int(match.group()) if match else 0
return (num, name)
def list_ink_colors(rows: list[dict], selected_set: str) -> list[str]:
inks = (Path(r["dir"]).stem for r in rows if r["set_name"] == selected_set)
return sorted(inks, key=_sort_key)
def create_datasheet(
selected_set: str,
selected_dir: str,
batch_serial: str,
backend: str | None = None,
rows: list[dict] | None = None,
addin_paths: list[str] | None = None,
config: dict | None = None,
) -> CreateResult:
log = get_logger()
ctx = f"set={selected_set!r} ink={selected_dir!r} serial={batch_serial!r}"
if not selected_set:
message = "Select a set."
log.error("Create failed: %s (%s)", message, ctx)
return CreateResult(ok=False, message=message)
if not selected_dir:
message = "Select an ink color."
log.error("Create failed: %s (%s)", message, ctx)
return CreateResult(ok=False, message=message)
if not batch_serial or not str(batch_serial).strip():
message = "Enter a serial."
log.error("Create failed: %s (%s)", message, ctx)
return CreateResult(ok=False, message=message)
batch_serial = str(batch_serial).strip()
ctx = f"set={selected_set!r} ink={selected_dir!r} serial={batch_serial!r}"
if config is None:
content, loaded_rows, config = load_config()
if rows is None:
rows = loaded_rows
if addin_paths is None:
addin_paths = content[3:5] if len(content) >= 5 else []
try:
resolved_backend = resolve_backend(backend, config.get("backend"))
except (ValueError, RuntimeError) as exc:
log.error("Create failed: %s (%s)", exc, ctx)
return CreateResult(ok=False, message=str(exc))
ctx = f"{ctx} backend={resolved_backend}"
matches = [r for r in rows if r["set_name"] == selected_set and r["dir"].endswith(selected_dir)]
if not matches:
message = f"No config row for set={selected_set!r} ink={selected_dir!r}."
log.error("Create failed: %s (%s)", message, ctx)
return CreateResult(ok=False, message=message)
row = matches[0]
path_ = Path(row["dir"])
pattern = row["pattern"]
search_pattern = pattern.replace("[SERIAL]", "*")
files = [str(x) for x in path_.glob(search_pattern) if x.is_file()]
if not files:
message = f"No workbooks matching {search_pattern!r} in {path_}"
log.error("Create failed: %s (%s)", message, ctx)
return CreateResult(
ok=False,
message=message,
backend=resolved_backend,
)
ref_workbook_name, new_workbook_name = get_workbook_names(
files, batch_serial, path_, pattern
)
template = Path(ref_workbook_name)
if new_workbook_name.is_file():
message = f"Destination already exists, skipped: {new_workbook_name}"
log.info(
"Create skipped: %s (template=%s destination=%s %s)",
message,
template,
new_workbook_name,
ctx,
)
return CreateResult(
ok=True,
skipped=True,
message=message,
template=template,
destination=new_workbook_name,
backend=resolved_backend,
)
cells_to_clear = row["cells_to_clear"]
notes_cell = row["notes_cell"]
serial_cell = row["serial_cell"]
try:
if resolved_backend == "com":
from xlsx_clean.com_backend import clean_workbook_com
with tempfile.TemporaryDirectory(prefix="xlsx_clean_") as tmp:
temp_workbook = Path(tmp) / "temp_workbook.xlsx"
shutil.copyfile(ref_workbook_name, temp_workbook)
clean_workbook_com(
source=temp_workbook,
destination=new_workbook_name,
cells_to_clear=cells_to_clear,
notes_cell=notes_cell,
serial_cell=serial_cell,
batch_serial=batch_serial,
addin_paths=addin_paths or [],
notes_value=NEW_VALUE,
)
else:
from xlsx_clean.ooxml_backend import clean_workbook_ooxml
clean_workbook_ooxml(
source=ref_workbook_name,
destination=new_workbook_name,
cells_to_clear=cells_to_clear,
notes_cell=notes_cell,
serial_cell=serial_cell,
batch_serial=batch_serial,
notes_value=NEW_VALUE,
)
except Exception as exc: # noqa: BLE001 - surface to CLI/UI
message = f"Failed to create workbook: {exc}"
log.exception(
"Create failed: %s (template=%s destination=%s %s)",
message,
template,
new_workbook_name,
ctx,
)
return CreateResult(
ok=False,
message=message,
template=template,
destination=new_workbook_name,
backend=resolved_backend,
)
message = f"Wrote {new_workbook_name}"
log.info(
"Create succeeded: %s (template=%s destination=%s %s)",
message,
template,
new_workbook_name,
ctx,
)
return CreateResult(
ok=True,
message=message,
template=template,
destination=new_workbook_name,
backend=resolved_backend,
)

View File

@@ -1,25 +1,25 @@
dir,pattern,set_name,cells_to_clear,serial_cell,notes_cell
"D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRCY1100T Blue","KRCY1100T Blue [SERIAL].xlsx","Kimia Razi","Batch!F2:F3,Batch!E12:G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11","Batch!D3","Batch!D25"
"D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRBK1300T Black","KRBK1300T Black [SERIAL].xlsx","Kimia Razi","Batch!F2:F3,Batch!E12:G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11","Batch!D3","Batch!D25"
"D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRBK1314T Black","KRBK1314T Black [SERIAL].xlsx","Kimia Razi","Batch!F2:F3,Batch!G12:I12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11","Batch!D3","Batch!D25"
"D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRBR1200T Brown","KRBR1200T Brown [SERIAL].xlsx","Kimia Razi","Batch!F2:F3,Batch!E12:G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11","Batch!D3","Batch!D25"
"D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRBR1201T Brown","KRBR1201T Brown [SERIAL].xlsx","Kimia Razi","Batch!F2:F3,Batch!E12:G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11","Batch!D3","Batch!D25"
"D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRYL1400T Yellow","KRYL1400T Yellow [SERIAL].xlsx","Kimia Razi","Batch!F2:F3,Batch!G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11","Batch!D3","Batch!D25"
"D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRYL1401T Yellow","KRYL1401T Yellow [SERIAL].xlsx","Kimia Razi","Batch!F2:F3,Batch!E12:G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11","Batch!D3","Batch!D25"
"D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRBG1600T Beige","KRBG1600T Beige [SERIAL].xlsx","Kimia Razi","Batch!F2:F3,Batch!G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11","Batch!D3","Batch!D25"
"D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRPK1500T Pink","KRPK1500T Pink [SERIAL].xlsx","Kimia Razi","Batch!F2:F3,Batch!G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11","Batch!D3","Batch!D25"
"D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRHN1700T Honey","KRHN1700T Honey [SERIAL].xlsx","Kimia Razi","Batch!F2:F3,Batch!G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11","Batch!D3","Batch!D25"
"D:\OpenCloud\inco\Quality control data sheet\2025\ICJ108 Beige","ICJ_108 op. [SERIAL].xlsx","inco","Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11","Batch!D3","Batch!D25"
"D:\OpenCloud\inco\Quality control data sheet\2026\ICJ610 Black","ICJ_610 op. [SERIAL].xlsx","inco","Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11","Batch!D3","Batch!D25"
"D:\OpenCloud\inco\Quality control data sheet\2026\ICJ308 Blue","ICJ_308 op. [SERIAL].xlsx","inco","Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11","Batch!D3","Batch!D25"
"D:\OpenCloud\inco\Quality control data sheet\2026\ICJEH680 Black","ICJ_EH680 op. [SERIAL].xlsx","inco","Batch!F2:F3,Batch!I12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11","Batch!D3","Batch!D25"
"D:\OpenCloud\inco\Quality control data sheet\2026\ICJEH630 Black","ICJ_EH630 op. [SERIAL].xlsx","inco","Batch!F2:F3,Batch!I12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11","Batch!D3","Batch!D25"
"D:\OpenCloud\inco\Quality control data sheet\2025\ICJEH600 Black","ICJ_EH600 op. [SERIAL].xlsx","inco","Batch!F2:F3,Batch!I12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11","Batch!D3","Batch!D25"
"D:\OpenCloud\inco\Quality control data sheet\2025\ICJ407 Brown","ICJ_407 op. [SERIAL].xlsx","inco","Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11","Batch!D3","Batch!D24"
"D:\OpenCloud\inco\Quality control data sheet\2025\ICJ408 Brown","ICJ_408 op. [SERIAL].xlsx","inco","Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11","Batch!D3","Batch!D24"
"D:\OpenCloud\inco\Quality control data sheet\2026\ICJ435 Beige","ICJ_435 op. [SERIAL].xlsx","inco","Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11","Batch!D3","Batch!D24"
"D:\OpenCloud\inco\Quality control data sheet\2025\ICJ107 Yellow","ICJ_107 yellow op. [SERIAL].xlsx","inco","Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11","Batch!D3","Batch!D25"
"D:\OpenCloud\inco\Quality control data sheet\2025\ICJ703 Pink","ICJ_703 op. [SERIAL].xlsx","inco","Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11","Batch!D3","Batch!D25"
"D:\OpenCloud\inco\Quality control data sheet\2024\ICJ309 Cyan","ICJ_309 cyan op. [SERIAL].xlsx","inco","Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11","Batch!D3","Batch!D25"
"D:\OpenCloud\inco\Quality control data sheet\2025\ICJ109 Golden Yellow","ICJ_109 op. [SERIAL].xlsx","inco","Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11","Batch!D3","Batch!D25"
"D:\OpenCloud\inco\Quality control data sheet\2026\ICJ152 Yellow","ICJ_152 yellow op. [SERIAL].xlsx","inco","Batch!F2:F3,Batch!I12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11","Batch!D3","Batch!D25"
Production\QC Datasheet\1403\KRCY1100T Blue,KRCY1100T Blue [SERIAL].xlsx,Kimia Razi,"Batch!F2:F3,Batch!E12:G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11",Batch!D3,Batch!D25
Production\QC Datasheet\1403\KRBK1300T Black,KRBK1300T Black [SERIAL].xlsx,Kimia Razi,"Batch!F2:F3,Batch!E12:G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11",Batch!D3,Batch!D25
Production\QC Datasheet\1403\KRBK1314T Black,KRBK1314T Black [SERIAL].xlsx,Kimia Razi,"Batch!F2:F3,Batch!G12:I12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11",Batch!D3,Batch!D25
Production\QC Datasheet\1403\KRBR1200T Brown,KRBR1200T Brown [SERIAL].xlsx,Kimia Razi,"Batch!F2:F3,Batch!E12:G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11",Batch!D3,Batch!D25
Production\QC Datasheet\1403\KRBR1201T Brown,KRBR1201T Brown [SERIAL].xlsx,Kimia Razi,"Batch!F2:F3,Batch!E12:G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11",Batch!D3,Batch!D25
Production\QC Datasheet\1403\KRYL1400T Yellow,KRYL1400T Yellow [SERIAL].xlsx,Kimia Razi,"Batch!F2:F3,Batch!G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11",Batch!D3,Batch!D25
Production\QC Datasheet\1403\KRYL1401T Yellow,KRYL1401T Yellow [SERIAL].xlsx,Kimia Razi,"Batch!F2:F3,Batch!E12:G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11",Batch!D3,Batch!D25
Production\QC Datasheet\1403\KRBG1600T Beige,KRBG1600T Beige [SERIAL].xlsx,Kimia Razi,"Batch!F2:F3,Batch!F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11",Batch!D3,Batch!D25
Production\QC Datasheet\1403\KRPK1500T Pink,KRPK1500T Pink [SERIAL].xlsx,Kimia Razi,"Batch!F2:F3,Batch!G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11",Batch!D3,Batch!D25
Production\QC Datasheet\1403\KRHN1700T Honey,KRHN1700T Honey [SERIAL].xlsx,Kimia Razi,"Batch!F2:F3,Batch!G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11",Batch!D3,Batch!D25
Quality control data sheet\2025\ICJ108 Beige,ICJ_108 op. [SERIAL].xlsx,inco,"Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11",Batch!D3,Batch!D25
Quality control data sheet\2026\ICJ610 Black,ICJ_610 op. [SERIAL].xlsx,inco,"Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11",Batch!D3,Batch!D25
Quality control data sheet\2026\ICJ308 Blue,ICJ_308 op. [SERIAL].xlsx,inco,"Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11",Batch!D3,Batch!D25
Quality control data sheet\2026\ICJEH680 Black,ICJ_EH680 op. [SERIAL].xlsx,inco,"Batch!F2:F3,Batch!I12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11",Batch!D3,Batch!D25
Quality control data sheet\2026\ICJEH630 Black,ICJ_EH630 op. [SERIAL].xlsx,inco,"Batch!F2:F3,Batch!I12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11",Batch!D3,Batch!D25
Quality control data sheet\2025\ICJEH600 Black,ICJ_EH600 op. [SERIAL].xlsx,inco,"Batch!F2:F3,Batch!I12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11",Batch!D3,Batch!D25
Quality control data sheet\2025\ICJ407 Brown,ICJ_407 op. [SERIAL].xlsx,inco,"Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11",Batch!D3,Batch!D24
Quality control data sheet\2025\ICJ408 Brown,ICJ_408 op. [SERIAL].xlsx,inco,"Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11",Batch!D3,Batch!D24
Quality control data sheet\2026\ICJ435 Beige,ICJ_435 op. [SERIAL].xlsx,inco,"Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11",Batch!D3,Batch!D24
Quality control data sheet\2025\ICJ107 Yellow,ICJ_107 yellow op. [SERIAL].xlsx,inco,"Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11",Batch!D3,Batch!D25
Quality control data sheet\2025\ICJ703 Pink,ICJ_703 op. [SERIAL].xlsx,inco,"Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11",Batch!D3,Batch!D25
Quality control data sheet\2024\ICJ309 Cyan,ICJ_309 cyan op. [SERIAL].xlsx,inco,"Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11",Batch!D3,Batch!D25
Quality control data sheet\2025\ICJ109 Golden Yellow,ICJ_109 op. [SERIAL].xlsx,inco,"Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11",Batch!D3,Batch!D25
Quality control data sheet\2026\ICJ152 Yellow,ICJ_152 yellow op. [SERIAL].xlsx,inco,"Batch!F2:F3,Batch!I12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11",Batch!D3,Batch!D25
1 dir pattern set_name cells_to_clear serial_cell notes_cell
2 D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRCY1100T Blue Production\QC Datasheet\1403\KRCY1100T Blue KRCY1100T Blue [SERIAL].xlsx Kimia Razi Batch!F2:F3,Batch!E12:G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11 Batch!D3 Batch!D25
3 D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRBK1300T Black Production\QC Datasheet\1403\KRBK1300T Black KRBK1300T Black [SERIAL].xlsx Kimia Razi Batch!F2:F3,Batch!E12:G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11 Batch!D3 Batch!D25
4 D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRBK1314T Black Production\QC Datasheet\1403\KRBK1314T Black KRBK1314T Black [SERIAL].xlsx Kimia Razi Batch!F2:F3,Batch!G12:I12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11 Batch!D3 Batch!D25
5 D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRBR1200T Brown Production\QC Datasheet\1403\KRBR1200T Brown KRBR1200T Brown [SERIAL].xlsx Kimia Razi Batch!F2:F3,Batch!E12:G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11 Batch!D3 Batch!D25
6 D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRBR1201T Brown Production\QC Datasheet\1403\KRBR1201T Brown KRBR1201T Brown [SERIAL].xlsx Kimia Razi Batch!F2:F3,Batch!E12:G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11 Batch!D3 Batch!D25
7 D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRYL1400T Yellow Production\QC Datasheet\1403\KRYL1400T Yellow KRYL1400T Yellow [SERIAL].xlsx Kimia Razi Batch!F2:F3,Batch!G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11 Batch!D3 Batch!D25
8 D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRYL1401T Yellow Production\QC Datasheet\1403\KRYL1401T Yellow KRYL1401T Yellow [SERIAL].xlsx Kimia Razi Batch!F2:F3,Batch!E12:G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11 Batch!D3 Batch!D25
9 D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRBG1600T Beige Production\QC Datasheet\1403\KRBG1600T Beige KRBG1600T Beige [SERIAL].xlsx Kimia Razi Batch!F2:F3,Batch!G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11 Batch!F2:F3,Batch!F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11 Batch!D3 Batch!D25
10 D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRPK1500T Pink Production\QC Datasheet\1403\KRPK1500T Pink KRPK1500T Pink [SERIAL].xlsx Kimia Razi Batch!F2:F3,Batch!G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11 Batch!D3 Batch!D25
11 D:\OpenCloud\Kimia Razi\Production\QC Datasheet\1403\KRHN1700T Honey Production\QC Datasheet\1403\KRHN1700T Honey KRHN1700T Honey [SERIAL].xlsx Kimia Razi Batch!F2:F3,Batch!G12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D7:D8,Milling!D11 Batch!D3 Batch!D25
12 D:\OpenCloud\inco\Quality control data sheet\2025\ICJ108 Beige Quality control data sheet\2025\ICJ108 Beige ICJ_108 op. [SERIAL].xlsx inco Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11 Batch!D3 Batch!D25
13 D:\OpenCloud\inco\Quality control data sheet\2026\ICJ610 Black Quality control data sheet\2026\ICJ610 Black ICJ_610 op. [SERIAL].xlsx inco Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11 Batch!D3 Batch!D25
14 D:\OpenCloud\inco\Quality control data sheet\2026\ICJ308 Blue Quality control data sheet\2026\ICJ308 Blue ICJ_308 op. [SERIAL].xlsx inco Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11 Batch!D3 Batch!D25
15 D:\OpenCloud\inco\Quality control data sheet\2026\ICJEH680 Black Quality control data sheet\2026\ICJEH680 Black ICJ_EH680 op. [SERIAL].xlsx inco Batch!F2:F3,Batch!I12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11 Batch!D3 Batch!D25
16 D:\OpenCloud\inco\Quality control data sheet\2026\ICJEH630 Black Quality control data sheet\2026\ICJEH630 Black ICJ_EH630 op. [SERIAL].xlsx inco Batch!F2:F3,Batch!I12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11 Batch!D3 Batch!D25
17 D:\OpenCloud\inco\Quality control data sheet\2025\ICJEH600 Black Quality control data sheet\2025\ICJEH600 Black ICJ_EH600 op. [SERIAL].xlsx inco Batch!F2:F3,Batch!I12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11 Batch!D3 Batch!D25
18 D:\OpenCloud\inco\Quality control data sheet\2025\ICJ407 Brown Quality control data sheet\2025\ICJ407 Brown ICJ_407 op. [SERIAL].xlsx inco Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11 Batch!D3 Batch!D24
19 D:\OpenCloud\inco\Quality control data sheet\2025\ICJ408 Brown Quality control data sheet\2025\ICJ408 Brown ICJ_408 op. [SERIAL].xlsx inco Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11 Batch!D3 Batch!D24
20 D:\OpenCloud\inco\Quality control data sheet\2026\ICJ435 Beige Quality control data sheet\2026\ICJ435 Beige ICJ_435 op. [SERIAL].xlsx inco Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11 Batch!D3 Batch!D24
21 D:\OpenCloud\inco\Quality control data sheet\2025\ICJ107 Yellow Quality control data sheet\2025\ICJ107 Yellow ICJ_107 yellow op. [SERIAL].xlsx inco Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11 Batch!D3 Batch!D25
22 D:\OpenCloud\inco\Quality control data sheet\2025\ICJ703 Pink Quality control data sheet\2025\ICJ703 Pink ICJ_703 op. [SERIAL].xlsx inco Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11 Batch!D3 Batch!D25
23 D:\OpenCloud\inco\Quality control data sheet\2024\ICJ309 Cyan Quality control data sheet\2024\ICJ309 Cyan ICJ_309 cyan op. [SERIAL].xlsx inco Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D19:J22,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11 Batch!D3 Batch!D25
24 D:\OpenCloud\inco\Quality control data sheet\2025\ICJ109 Golden Yellow Quality control data sheet\2025\ICJ109 Golden Yellow ICJ_109 op. [SERIAL].xlsx inco Batch!F2:F3,Batch!E12:F12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11 Batch!D3 Batch!D25
25 D:\OpenCloud\inco\Quality control data sheet\2026\ICJ152 Yellow Quality control data sheet\2026\ICJ152 Yellow ICJ_152 yellow op. [SERIAL].xlsx inco Batch!F2:F3,Batch!I12,Batch!O9:Q10,Batch!O12:Q12,Batch!N10,Batch!N13,Batch!D20:J23,'KW'!C3:C4,Milling!G5:K8,Milling!G11:K11,Milling!D6:D8,Milling!D11,Mix!B3:D11 Batch!D3 Batch!D25

Binary file not shown.

Binary file not shown.

298
src/xlsx_clean/gui_app.py Normal file
View File

@@ -0,0 +1,298 @@
"""Cross-platform Dear PyGui desktop GUI for New QC Sheet."""
from __future__ import annotations
import argparse
import sys
from importlib.metadata import PackageNotFoundError, version as package_version
import dearpygui.dearpygui as dpg
from xlsx_clean.core import (
create_datasheet,
list_ink_colors,
list_sets,
load_config,
)
from xlsx_clean.paths import default_backend, package_file
try:
_VERSION = package_version('xlsx-clean')
except PackageNotFoundError:
_VERSION = 'dev'
# Module-level variables
rows = []
addin_paths = []
config = {}
# Tags
SET_COMBO = "set_combo"
INK_COMBO = "ink_combo"
SERIAL_INPUT = "serial_input"
STATUS_TEXT = "status_text"
HEADING_FONT = "heading_font"
def on_set_change(sender, app_data):
"""Callback when the set combo changes."""
new_inks = list_ink_colors(rows, app_data)
dpg.configure_item(INK_COMBO, items=new_inks)
dpg.set_value(INK_COMBO, new_inks[0] if new_inks else '')
def on_create(sender, app_data):
"""Callback for the Create datasheet button."""
selected_set = dpg.get_value(SET_COMBO)
selected_dir = dpg.get_value(INK_COMBO)
batch_serial = dpg.get_value(SERIAL_INPUT)
try:
result = create_datasheet(
selected_set=selected_set,
selected_dir=selected_dir,
batch_serial=batch_serial,
backend=None,
rows=rows,
addin_paths=addin_paths,
config=config
)
msg = result.message
if result.template:
msg += f"\nTemplate: {result.template}"
if result.destination:
msg += f"\nDestination: {result.destination}"
if result.backend:
msg += f"\nBackend: {result.backend}"
dpg.set_value(STATUS_TEXT, msg)
if result.skipped:
dpg.configure_item(STATUS_TEXT, color=(230, 180, 30)) # Yellow
elif result.ok:
dpg.configure_item(STATUS_TEXT, color=(0, 200, 80)) # Green
else:
dpg.configure_item(STATUS_TEXT, color=(220, 60, 60)) # Red
except Exception as e:
dpg.set_value(STATUS_TEXT, f"Error: {e}")
dpg.configure_item(STATUS_TEXT, color=(220, 60, 60))
def _create_modern_theme() -> int:
"""Build a global theme that gives DPG widgets a modern, web-like feel, matching the HTML demo."""
with dpg.theme() as theme:
with dpg.theme_component(dpg.mvAll):
# Rounded corners (like CSS border-radius)
dpg.add_theme_style(dpg.mvStyleVar_FrameRounding, 4)
dpg.add_theme_style(dpg.mvStyleVar_PopupRounding, 4)
dpg.add_theme_style(dpg.mvStyleVar_WindowRounding, 8)
dpg.add_theme_style(dpg.mvStyleVar_GrabRounding, 4)
dpg.add_theme_style(dpg.mvStyleVar_TabRounding, 4)
dpg.add_theme_style(dpg.mvStyleVar_ChildRounding, 4)
dpg.add_theme_style(dpg.mvStyleVar_ScrollbarRounding, 4)
# Generous padding (like CSS padding)
dpg.add_theme_style(dpg.mvStyleVar_FramePadding, 12, 10)
dpg.add_theme_style(dpg.mvStyleVar_ItemSpacing, 10, 10)
dpg.add_theme_style(dpg.mvStyleVar_ItemInnerSpacing, 8, 6)
dpg.add_theme_style(dpg.mvStyleVar_WindowPadding, 48, 48)
# Scrollbar
dpg.add_theme_style(dpg.mvStyleVar_ScrollbarSize, 12)
# Colors from demo.html
bg = (248, 250, 252, 255) # Slate 50 (#f8fafc)
surface = (255, 255, 255, 255) # White (#ffffff)
frame = (255, 255, 255, 255) # White (inputs)
frame_hover = (240, 253, 250, 255) # Teal 50 (#f0fdfa)
frame_active = (204, 251, 241, 255) # Teal 100 (#ccfbf1)
accent = (15, 118, 110, 255) # Teal 700 (#0f766e) - Primary
accent_hover = (17, 94, 89, 255) # Teal 800 (#115e59) - Secondary
accent_active = (19, 78, 74, 255) # Teal 900 (#134e4a)
text = (15, 23, 42, 255) # Slate 900 (#0f172a)
text_dim = (100, 116, 139, 255) # Slate 500 (#64748b)
border = (203, 213, 225, 255) # Slate 300 (#cbd5e1)
popup_bg = (255, 255, 255, 255) # White dropdowns
# Window
dpg.add_theme_color(dpg.mvThemeCol_WindowBg, bg)
dpg.add_theme_color(dpg.mvThemeCol_PopupBg, popup_bg)
dpg.add_theme_color(dpg.mvThemeCol_TitleBg, bg)
dpg.add_theme_color(dpg.mvThemeCol_TitleBgActive, bg)
# Frame (combos, inputs)
dpg.add_theme_color(dpg.mvThemeCol_FrameBg, frame)
dpg.add_theme_color(dpg.mvThemeCol_FrameBgHovered, frame_hover)
dpg.add_theme_color(dpg.mvThemeCol_FrameBgActive, frame_active)
# Border
dpg.add_theme_color(dpg.mvThemeCol_Border, border)
dpg.add_theme_color(dpg.mvThemeCol_BorderShadow, (0, 0, 0, 0))
dpg.add_theme_style(dpg.mvStyleVar_FrameBorderSize, 1)
# Button (Combo box drop arrows) - blend into frame
dpg.add_theme_color(dpg.mvThemeCol_Button, frame)
dpg.add_theme_color(dpg.mvThemeCol_ButtonHovered, frame_hover)
dpg.add_theme_color(dpg.mvThemeCol_ButtonActive, frame_active)
# Header (combo dropdown items on hover)
dpg.add_theme_color(dpg.mvThemeCol_Header, frame_hover)
dpg.add_theme_color(dpg.mvThemeCol_HeaderHovered, frame_active)
dpg.add_theme_color(dpg.mvThemeCol_HeaderActive, accent)
# Text
dpg.add_theme_color(dpg.mvThemeCol_Text, text)
dpg.add_theme_color(dpg.mvThemeCol_TextDisabled, text_dim)
# Separator
dpg.add_theme_color(dpg.mvThemeCol_Separator, border)
# Scrollbar
dpg.add_theme_color(dpg.mvThemeCol_ScrollbarBg, bg)
dpg.add_theme_color(dpg.mvThemeCol_ScrollbarGrab, border)
dpg.add_theme_color(dpg.mvThemeCol_ScrollbarGrabHovered, text_dim)
dpg.add_theme_color(dpg.mvThemeCol_ScrollbarGrabActive, text)
# Check mark / selection
dpg.add_theme_color(dpg.mvThemeCol_CheckMark, accent)
return theme
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(
description="New QC Sheet — Dear PyGui desktop application.",
)
parser.add_argument('--width', type=int, default=650, help='Window width')
parser.add_argument('--height', type=int, default=700, help='Window height')
return parser.parse_args()
def main() -> None:
global rows, addin_paths, config
args = parse_args()
dpg.create_context()
# --- Modern theme ---------------------------------------------------
modern_theme = _create_modern_theme()
dpg.bind_theme(modern_theme)
# --- Load Inter font ------------------------------------------------
font_regular = package_file("fonts/Inter-Regular.ttf")
font_bold = package_file("fonts/Inter-Bold.ttf")
default_font = None
heading_font = None
label_font = None
if font_regular.is_file():
with dpg.font_registry():
default_font = dpg.add_font(str(font_regular), 18)
label_font = dpg.add_font(str(font_regular), 14)
if font_bold.is_file():
heading_font = dpg.add_font(str(font_bold), 28, tag=HEADING_FONT)
# Load config and initialize variables
sets = []
initial_inks = []
error_msg = ""
label_set = 'Select Set'
label_ink = 'Select Ink Color'
label_serial = 'Serial:'
try:
content, loaded_rows, loaded_config = load_config()
rows = loaded_rows
config = loaded_config
if len(content) >= 5:
label_set = content[0]
label_ink = content[1]
label_serial = content[2]
addin_paths = content[3:5]
sets = list_sets(rows)
if sets:
initial_inks = list_ink_colors(rows, sets[0])
except Exception as e:
error_msg = f"Failed to load config: {e}"
with dpg.theme() as tight_theme:
with dpg.theme_component(dpg.mvAll):
dpg.add_theme_style(dpg.mvStyleVar_ItemSpacing, 10, -8)
with dpg.theme() as normal_spacing_theme:
with dpg.theme_component(dpg.mvAll):
dpg.add_theme_style(dpg.mvStyleVar_ItemSpacing, 10, 10)
with dpg.theme() as btn_theme:
with dpg.theme_component(dpg.mvButton):
dpg.add_theme_color(dpg.mvThemeCol_Text, (255, 255, 255, 255))
dpg.add_theme_color(dpg.mvThemeCol_Button, (15, 118, 110, 255))
dpg.add_theme_color(dpg.mvThemeCol_ButtonHovered, (17, 94, 89, 255))
dpg.add_theme_color(dpg.mvThemeCol_ButtonActive, (19, 78, 74, 255))
with dpg.window(tag="primary_window"):
if default_font:
dpg.bind_font(default_font)
title = dpg.add_text('New QC Sheet', color=(17, 94, 89, 255))
if heading_font:
dpg.bind_item_font(title, heading_font)
dpg.add_text(f"v{_VERSION}", color=(100, 106, 120))
dpg.add_spacer(height=4)
dpg.add_separator()
dpg.add_spacer(height=10)
def add_floating_label(text):
lbl = dpg.add_text(text, color=(15, 118, 110, 255))
if label_font:
dpg.bind_item_font(lbl, label_font)
with dpg.group() as g1:
add_floating_label(label_set)
c1 = dpg.add_combo(items=sets, default_value=sets[0] if sets else '',
tag=SET_COMBO, callback=on_set_change, width=-1)
dpg.bind_item_theme(c1, normal_spacing_theme)
dpg.bind_item_theme(g1, tight_theme)
dpg.add_spacer(height=8)
with dpg.group() as g2:
add_floating_label(label_ink)
c2 = dpg.add_combo(items=initial_inks,
default_value=initial_inks[0] if initial_inks else '',
tag=INK_COMBO, width=-1)
dpg.bind_item_theme(c2, normal_spacing_theme)
dpg.bind_item_theme(g2, tight_theme)
dpg.add_spacer(height=8)
with dpg.group() as g3:
add_floating_label(label_serial)
c3 = dpg.add_input_text(tag=SERIAL_INPUT, width=-1, hint="e.g. 1234/A")
dpg.bind_item_theme(c3, normal_spacing_theme)
dpg.bind_item_theme(g3, tight_theme)
dpg.add_spacer(height=10)
dpg.add_separator()
dpg.add_spacer(height=10)
btn = dpg.add_button(label='Create datasheet', width=-1, height=38,
callback=on_create)
dpg.bind_item_theme(btn, btn_theme)
dpg.add_spacer(height=14)
dpg.add_text(error_msg, tag=STATUS_TEXT, wrap=args.width - 40)
if error_msg:
dpg.configure_item(STATUS_TEXT, color=(220, 60, 60))
dpg.create_viewport(title=f'New QC Sheet · v{_VERSION}',
width=args.width, height=args.height)
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.set_primary_window("primary_window", True)
dpg.start_dearpygui()
dpg.destroy_context()
if __name__ == '__main__':
main()

View File

@@ -1 +1,2 @@
python .\clean_cells.py
@echo off
python -m xlsx_clean.clean_cells %*

View File

@@ -0,0 +1,362 @@
"""Surgical OOXML edits that preserve non-worksheet package parts.
Unlike openpyxl load/save, this rewrites only worksheet XML (and optionally
drops calcChain) so connections, queries, styles, drawings, etc. stay intact.
"""
from __future__ import annotations
import io
import re
import zipfile
from pathlib import Path
from typing import Iterable
from xml.etree import ElementTree as ET
MAIN_NS = "http://schemas.openxmlformats.org/spreadsheetml/2006/main"
REL_NS = "http://schemas.openxmlformats.org/package/2006/relationships"
OFFICE_REL_NS = "http://schemas.openxmlformats.org/officeDocument/2006/relationships"
WORKSHEET_REL_TYPE = f"{OFFICE_REL_NS}/worksheet"
ET.register_namespace("", MAIN_NS)
ET.register_namespace("r", OFFICE_REL_NS)
NS = {"m": MAIN_NS, "r": REL_NS, "pr": OFFICE_REL_NS}
_CELL_REF_RE = re.compile(r"^([A-Za-z]+)(\d+)$")
def _q(tag: str) -> str:
return f"{{{MAIN_NS}}}{tag}"
def col_letters_to_index(letters: str) -> int:
result = 0
for ch in letters.upper():
result = result * 26 + (ord(ch) - ord("A") + 1)
return result
def index_to_col_letters(index: int) -> str:
letters = []
while index:
index, rem = divmod(index - 1, 26)
letters.append(chr(ord("A") + rem))
return "".join(reversed(letters))
def parse_cell_ref(ref: str) -> tuple[str, int]:
match = _CELL_REF_RE.match(ref.strip())
if not match:
raise ValueError(f"Invalid cell reference: {ref!r}")
return match.group(1).upper(), int(match.group(2))
def expand_a1_range(a1: str) -> list[str]:
"""Expand 'F2', 'F2:F3', or 'E12:G12' into individual A1 refs."""
a1 = a1.strip()
if ":" not in a1:
col, row = parse_cell_ref(a1)
return [f"{col}{row}"]
start, end = a1.split(":", 1)
start_col, start_row = parse_cell_ref(start)
end_col, end_row = parse_cell_ref(end)
c0, c1 = col_letters_to_index(start_col), col_letters_to_index(end_col)
r0, r1 = start_row, end_row
if c0 > c1:
c0, c1 = c1, c0
if r0 > r1:
r0, r1 = r1, r0
refs: list[str] = []
for row in range(r0, r1 + 1):
for col in range(c0, c1 + 1):
refs.append(f"{index_to_col_letters(col)}{row}")
return refs
def parse_sheet_cell_ref(spec: str) -> tuple[str, str]:
"""Parse 'Batch!F2:F3' or \"'KW'!C3:C4\" into (sheet_name, a1_range)."""
spec = spec.strip()
if "!" not in spec:
raise ValueError(f"Expected Sheet!A1 reference, got {spec!r}")
sheet, a1 = spec.split("!", 1)
sheet = sheet.strip().strip("'").strip('"')
return sheet, a1.strip()
def _sheet_targets(zf: zipfile.ZipFile) -> dict[str, str]:
"""Map sheet name -> zip member path (e.g. xl/worksheets/sheet1.xml)."""
workbook_xml = ET.fromstring(zf.read("xl/workbook.xml"))
rels_xml = ET.fromstring(zf.read("xl/_rels/workbook.xml.rels"))
rel_id_to_target: dict[str, str] = {}
for rel in rels_xml.findall("r:Relationship", NS):
if rel.get("Type") != WORKSHEET_REL_TYPE:
continue
rid = rel.get("Id")
target = rel.get("Target")
if not rid or not target:
continue
# Targets are relative to xl/
target = target.lstrip("/")
if not target.startswith("xl/"):
target = f"xl/{target}"
rel_id_to_target[rid] = target
name_to_path: dict[str, str] = {}
sheets = workbook_xml.find("m:sheets", NS)
if sheets is None:
return name_to_path
for sheet in sheets.findall("m:sheet", NS):
name = sheet.get("name")
rid = sheet.get(f"{{{OFFICE_REL_NS}}}id")
if name and rid and rid in rel_id_to_target:
name_to_path[name] = rel_id_to_target[rid]
return name_to_path
def _find_row(sheet_root: ET.Element, row_num: int) -> ET.Element | None:
sheet_data = sheet_root.find("m:sheetData", NS)
if sheet_data is None:
return None
for row in sheet_data.findall("m:row", NS):
if row.get("r") == str(row_num):
return row
return None
def _ensure_sheet_data(sheet_root: ET.Element) -> ET.Element:
sheet_data = sheet_root.find("m:sheetData", NS)
if sheet_data is not None:
return sheet_data
sheet_data = ET.SubElement(sheet_root, _q("sheetData"))
return sheet_data
def _ensure_row(sheet_root: ET.Element, row_num: int) -> ET.Element:
existing = _find_row(sheet_root, row_num)
if existing is not None:
return existing
sheet_data = _ensure_sheet_data(sheet_root)
new_row = ET.Element(_q("row"), {"r": str(row_num)})
# Insert in row-number order
inserted = False
for idx, row in enumerate(list(sheet_data)):
if row.tag != _q("row"):
continue
r_attr = row.get("r")
if r_attr is not None and int(r_attr) > row_num:
sheet_data.insert(idx, new_row)
inserted = True
break
if not inserted:
sheet_data.append(new_row)
return new_row
def _find_cell(row: ET.Element, ref: str) -> ET.Element | None:
for cell in row.findall("m:c", NS):
if cell.get("r") == ref:
return cell
return None
def _ensure_cell(row: ET.Element, ref: str) -> ET.Element:
existing = _find_cell(row, ref)
if existing is not None:
return existing
col_letters, _ = parse_cell_ref(ref)
col_idx = col_letters_to_index(col_letters)
new_cell = ET.Element(_q("c"), {"r": ref})
inserted = False
for idx, cell in enumerate(list(row)):
if cell.tag != _q("c"):
continue
cell_ref = cell.get("r")
if not cell_ref:
continue
other_col, _ = parse_cell_ref(cell_ref)
if col_letters_to_index(other_col) > col_idx:
row.insert(idx, new_cell)
inserted = True
break
if not inserted:
row.append(new_cell)
return new_cell
def _clear_cell_contents(cell: ET.Element) -> None:
"""Clear value/formula like Excel ClearContents; keep style attrs."""
# Drop type/value-related attrs; keep r and s (style).
for attr in list(cell.attrib):
if attr not in ("r", "s", "cm", "vm", "ph"):
del cell.attrib[attr]
for child in list(cell):
cell.remove(child)
def _set_cell_string(cell: ET.Element, value: str) -> None:
"""Set an inline string value, preserving style attribute when present."""
style = cell.get("s")
_clear_cell_contents(cell)
if style is not None:
cell.set("s", style)
if value == "":
# Empty string: leave cell present with style only (cleared).
return
cell.set("t", "inlineStr")
is_el = ET.SubElement(cell, _q("is"))
t_el = ET.SubElement(is_el, _q("t"))
t_el.text = value
if value.startswith(" ") or value.endswith(" ") or "\n" in value:
t_el.set("{http://www.w3.org/XML/1998/namespace}space", "preserve")
def _sheet_xml_tostring(root: ET.Element) -> bytes:
# Preserve XML declaration; Excel is picky about namespaces on worksheets.
body = ET.tostring(root, encoding="utf-8", xml_declaration=True)
return body
def _apply_ops_to_sheet(
sheet_xml: bytes,
clear_refs: Iterable[str],
set_values: dict[str, str],
) -> bytes:
root = ET.fromstring(sheet_xml)
for ref in clear_refs:
col, row_num = parse_cell_ref(ref)
row = _find_row(root, row_num)
if row is None:
continue
cell = _find_cell(row, f"{col}{row_num}")
if cell is not None:
_clear_cell_contents(cell)
for ref, value in set_values.items():
col, row_num = parse_cell_ref(ref)
row = _ensure_row(root, row_num)
cell = _ensure_cell(row, f"{col}{row_num}")
_set_cell_string(cell, value)
return _sheet_xml_tostring(root)
def apply_cell_edits(
source: Path | str,
destination: Path | str,
clear_specs: Iterable[str],
set_specs: dict[str, str],
) -> None:
"""Copy source workbook to destination with surgical cell edits.
clear_specs: iterable of 'Sheet!A1:B2' ranges to ClearContents.
set_specs: mapping of 'Sheet!A1' -> string value to write.
"""
source = Path(source)
destination = Path(destination)
destination.parent.mkdir(parents=True, exist_ok=True)
clears_by_sheet: dict[str, list[str]] = {}
for spec in clear_specs:
sheet, a1 = parse_sheet_cell_ref(spec)
clears_by_sheet.setdefault(sheet, []).extend(expand_a1_range(a1))
sets_by_sheet: dict[str, dict[str, str]] = {}
for spec, value in set_specs.items():
sheet, a1 = parse_sheet_cell_ref(spec)
refs = expand_a1_range(a1)
sheet_sets = sets_by_sheet.setdefault(sheet, {})
for ref in refs:
sheet_sets[ref] = value
touched_sheets = set(clears_by_sheet) | set(sets_by_sheet)
with zipfile.ZipFile(source, "r") as zin:
name_to_path = _sheet_targets(zin)
missing = sorted(touched_sheets - set(name_to_path))
if missing:
raise KeyError(f"Worksheet(s) not found in workbook: {missing}")
rewritten: dict[str, bytes] = {}
for sheet_name in touched_sheets:
member = name_to_path[sheet_name]
rewritten[member] = _apply_ops_to_sheet(
zin.read(member),
clears_by_sheet.get(sheet_name, []),
sets_by_sheet.get(sheet_name, {}),
)
# Drop calcChain so Excel rebuilds after formula clears, and scrub
# dangling Content_Types / workbook rels entries that pointed at it.
skip = {"xl/calcChain.xml"}
if "xl/calcChain.xml" in zin.namelist():
if "[Content_Types].xml" in zin.namelist():
rewritten["[Content_Types].xml"] = _strip_calc_chain_content_types(
zin.read("[Content_Types].xml")
)
if "xl/_rels/workbook.xml.rels" in zin.namelist():
rewritten["xl/_rels/workbook.xml.rels"] = _strip_calc_chain_rels(
zin.read("xl/_rels/workbook.xml.rels")
)
with zipfile.ZipFile(destination, "w", compression=zipfile.ZIP_DEFLATED) as zout:
for info in zin.infolist():
if info.filename in skip:
continue
if info.filename in rewritten:
zout.writestr(info, rewritten[info.filename])
else:
zout.writestr(info, zin.read(info.filename))
def _strip_calc_chain_content_types(data: bytes) -> bytes:
"""Remove calcChain Override without rewriting package namespaces."""
text = data.decode("utf-8")
text = re.sub(
r'\s*<[^>]*PartName="[^"]*calcChain\.xml"[^>]*/>',
"",
text,
flags=re.IGNORECASE,
)
return text.encode("utf-8")
def _strip_calc_chain_rels(data: bytes) -> bytes:
"""Remove calcChain Relationship without rewriting package namespaces."""
text = data.decode("utf-8")
text = re.sub(
r'\s*<[^>]*Target="[^"]*calcChain\.xml"[^>]*/>',
"",
text,
flags=re.IGNORECASE,
)
return text.encode("utf-8")
def clean_workbook_ooxml(
source: Path | str,
destination: Path | str,
cells_to_clear: str,
notes_cell: str,
serial_cell: str,
batch_serial: str,
notes_value: str = "",
) -> None:
"""High-level OOXML backend matching the COM clean sequence."""
clear_specs = [part.strip() for part in cells_to_clear.split(",") if part.strip()]
set_specs: dict[str, str] = {}
for part in notes_cell.split(","):
part = part.strip()
if part:
set_specs[part] = notes_value
for part in serial_cell.split(","):
part = part.strip()
if part:
set_specs[part] = batch_serial
apply_cell_edits(source, destination, clear_specs, set_specs)

51
src/xlsx_clean/paths.py Normal file
View File

@@ -0,0 +1,51 @@
"""Config and path helpers for cross-platform workbook roots."""
from __future__ import annotations
import os
import sys
from pathlib import Path
def _package_dir() -> Path:
"""Directory containing package data (CSV/txt), including PyInstaller bundles."""
if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"):
bundled = Path(sys._MEIPASS) / "xlsx_clean"
if bundled.is_dir():
return bundled
return Path(sys._MEIPASS)
return Path(__file__).resolve().parent
PACKAGE_DIR = _package_dir()
def package_file(name: str) -> Path:
return PACKAGE_DIR / name
def default_config_path() -> Path:
"""Resolve the default location for the TOML configuration file."""
if getattr(sys, "frozen", False):
return Path(sys.executable).resolve().parent / "config.toml"
return Path.home() / ".xlsx-clean" / "config.toml"
def default_backend() -> str:
return "com" if sys.platform == "win32" else "ooxml"
def resolve_backend(requested: str | None, config_backend: str | None = None) -> str:
"""Resolve backend using explicitly requested, config file, or system default."""
if requested:
backend = requested.lower()
elif config_backend:
backend = config_backend.lower()
else:
backend = default_backend().lower()
if backend not in {"com", "ooxml"}:
raise ValueError(f"Unknown backend {backend!r}; use 'com' or 'ooxml'")
if backend == "com" and sys.platform != "win32":
raise RuntimeError(
"COM backend requires Windows with Microsoft Excel and pywin32"
)
return backend

259
uv.lock generated Normal file
View File

@@ -0,0 +1,259 @@
version = 1
revision = 3
requires-python = ">=3.12"
resolution-markers = [
"python_full_version >= '3.14' and sys_platform == 'win32'",
"python_full_version >= '3.14' and sys_platform == 'emscripten'",
"python_full_version >= '3.14' and sys_platform != 'emscripten' and sys_platform != 'win32'",
"python_full_version < '3.14' and sys_platform == 'win32'",
"python_full_version < '3.14' and sys_platform == 'emscripten'",
"python_full_version < '3.14' and sys_platform != 'emscripten' and sys_platform != 'win32'",
]
[[package]]
name = "altgraph"
version = "0.17.5"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/7e/f8/97fdf103f38fed6792a1601dbc16cc8aac56e7459a9fff08c812d8ae177a/altgraph-0.17.5.tar.gz", hash = "sha256:c87b395dd12fabde9c99573a9749d67da8d29ef9de0125c7f536699b4a9bc9e7", size = 48428, upload-time = "2025-11-21T20:35:50.583Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/a9/ba/000a1996d4308bc65120167c21241a3b205464a2e0b58deda26ae8ac21d1/altgraph-0.17.5-py2.py3-none-any.whl", hash = "sha256:f3a22400bce1b0c701683820ac4f3b159cd301acab067c51c653e06961600597", size = 21228, upload-time = "2025-11-21T20:35:49.444Z" },
]
[[package]]
name = "beaupy"
version = "3.12.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "emoji" },
{ name = "python-yakh" },
{ name = "questo" },
{ name = "rich" },
]
sdist = { url = "https://files.pythonhosted.org/packages/80/65/6e501a432db02adb3c974473d73360880878797fbe25405c08024fa76bce/beaupy-3.12.0.tar.gz", hash = "sha256:e0ca6d2356b611ae734c8cf97b28ed9e3bb941d3207af2426e182da836a385d6", size = 16671, upload-time = "2026-05-21T19:10:01.649Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/5f/91/645739784ac1cda4eb4dfaeb7b31aa0fe949499e517c0a9616341bb8201d/beaupy-3.12.0-py3-none-any.whl", hash = "sha256:b3c1451c81ae329f91b27688faac0ae0f7ccbefc5ee97967a888582000d477c9", size = 15007, upload-time = "2026-05-21T19:10:00.595Z" },
]
[[package]]
name = "dearpygui"
version = "2.3.1"
source = { registry = "https://pypi.org/simple" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/20/f1/6f30c7eafa25755105d0c26049a95c89cc5c82b68971e1cc8ffea36b748a/dearpygui-2.3.1-cp312-cp312-macosx_13_0_arm64.whl", hash = "sha256:6b1efd675a358176b3b76c039587a543d407d8fbb2cc3643a527e0ab7c0f5577", size = 2002717, upload-time = "2026-05-01T22:46:00.242Z" },
{ url = "https://files.pythonhosted.org/packages/cc/03/fa76c31087b6ebbc13948de6d9d3bc9ed9946824b13d9d1089356b54249c/dearpygui-2.3.1-cp312-cp312-manylinux1_x86_64.whl", hash = "sha256:364b5b6a0953999fec764d529d9bb0b2cc6ab6ed06188e0ded28237c1475ca98", size = 2678552, upload-time = "2026-05-01T22:46:07.502Z" },
{ url = "https://files.pythonhosted.org/packages/f2/ef/657ec68a79664cd28d98d590eed85103c6ffc1e23e7d3c4e5aedb7ee887d/dearpygui-2.3.1-cp312-cp312-manylinux2014_aarch64.whl", hash = "sha256:199dffebda245c9f59aa7c10c3b7f62963237c5f744150ad9be409b27a2661d3", size = 2501224, upload-time = "2026-05-01T22:46:18.8Z" },
{ url = "https://files.pythonhosted.org/packages/77/be/e67e5a04439f15e60cf596092a31b2a907272288954e47f5ced43c0b1678/dearpygui-2.3.1-cp312-cp312-win_amd64.whl", hash = "sha256:26ed9197cdb30099c665bd1b23724e0dba60ad06b71344ecca7e52748c21874b", size = 1882080, upload-time = "2026-05-01T22:45:49.366Z" },
{ url = "https://files.pythonhosted.org/packages/42/db/56a293ad392b8dafdd3eb1a0c4d367efbde99aa6930359685fe270984dd1/dearpygui-2.3.1-cp313-cp313-macosx_13_0_arm64.whl", hash = "sha256:d2d29e72b031886893b32269e1478eff1fd651512e6c2bceda91059c3bc8ee0e", size = 2002694, upload-time = "2026-05-01T22:46:01.425Z" },
{ url = "https://files.pythonhosted.org/packages/cc/e0/df598671f40a7fffb8390946115d9e9cf12d3f4a52f5b9381bddc5699aee/dearpygui-2.3.1-cp313-cp313-manylinux1_x86_64.whl", hash = "sha256:e3f64c8d4cae68a3b5be1b7531d08400ccbf1e4ff03c7acfc85954f98993f864", size = 2678564, upload-time = "2026-05-01T22:46:08.706Z" },
{ url = "https://files.pythonhosted.org/packages/d0/d1/87cfb577d4a1615e809e2f6e0fd720bd4ad6cd25e365ef2fd08a6e09c86e/dearpygui-2.3.1-cp313-cp313-manylinux2014_aarch64.whl", hash = "sha256:0d8b7a5a04cd4a6e25dbf162aa0405cf12143a1c82b33e371c20e5ba8d9349f3", size = 2503196, upload-time = "2026-05-01T22:46:20.276Z" },
{ url = "https://files.pythonhosted.org/packages/b3/38/05f74181a59353bdc927b6ec46333714f633c5755f3d4bcda34d6eb100a5/dearpygui-2.3.1-cp313-cp313-win_amd64.whl", hash = "sha256:7946722c50f1e08866dfdb78eb33dd4e67dea1a3cfe4400b159e1c96861116dc", size = 1882082, upload-time = "2026-05-01T22:45:50.915Z" },
{ url = "https://files.pythonhosted.org/packages/4a/08/68ce3ba941cf09bcf288f2603d7178c936d473172fd545e0665b885cb840/dearpygui-2.3.1-cp314-cp314-macosx_13_0_arm64.whl", hash = "sha256:e2cbabd8d383308ea3520360e100d1e95c9a957cd26247431cd4920b23c3b56e", size = 2003034, upload-time = "2026-05-01T22:46:02.736Z" },
{ url = "https://files.pythonhosted.org/packages/f3/3f/ac003b6d636c9f5aae910a62d00b6c119403212cf2d7772d7c59ca8ef6dd/dearpygui-2.3.1-cp314-cp314-manylinux1_x86_64.whl", hash = "sha256:953442c7272e57f3686e393edc5cf6ce73cc2f47142739735dfabed403e33770", size = 2678545, upload-time = "2026-05-01T22:46:10.181Z" },
{ url = "https://files.pythonhosted.org/packages/1a/6b/657a2f1e2f604f356c39ed5b870aaed5d07fdeac3139fae2a455473b64ca/dearpygui-2.3.1-cp314-cp314-manylinux2014_aarch64.whl", hash = "sha256:43a561b5dc589944a3a2b469e5e68f1ab35ae38b3dcdf1f813ed9d6e024153f8", size = 2501699, upload-time = "2026-05-01T22:46:21.497Z" },
{ url = "https://files.pythonhosted.org/packages/8c/56/93b2310891589063e0226cb07fe05e08fbdb3f409f80f9edefb1cebea84e/dearpygui-2.3.1-cp314-cp314-win_amd64.whl", hash = "sha256:272cc52c66bc5a4a332f13a3af5e603070d47ca7cc4976e6a8c247594e2b3dd0", size = 1943067, upload-time = "2026-05-01T22:45:52.255Z" },
]
[[package]]
name = "emoji"
version = "2.15.0"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/a2/78/0d2db9382c92a163d7095fc08efff7800880f830a152cfced40161e7638d/emoji-2.15.0.tar.gz", hash = "sha256:eae4ab7d86456a70a00a985125a03263a5eac54cd55e51d7e184b1ed3b6757e4", size = 615483, upload-time = "2025-09-21T12:13:02.755Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/e1/5e/4b5aaaabddfacfe36ba7768817bd1f71a7a810a43705e531f3ae4c690767/emoji-2.15.0-py3-none-any.whl", hash = "sha256:205296793d66a89d88af4688fa57fd6496732eb48917a87175a023c8138995eb", size = 608433, upload-time = "2025-09-21T12:13:01.197Z" },
]
[[package]]
name = "macholib"
version = "1.16.4"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "altgraph", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" },
]
sdist = { url = "https://files.pythonhosted.org/packages/10/2f/97589876ea967487978071c9042518d28b958d87b17dceb7cdc1d881f963/macholib-1.16.4.tar.gz", hash = "sha256:f408c93ab2e995cd2c46e34fe328b130404be143469e41bc366c807448979362", size = 59427, upload-time = "2025-11-22T08:28:38.373Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/c7/d1/a9f36f8ecdf0fb7c9b1e78c8d7af12b8c8754e74851ac7b94a8305540fc7/macholib-1.16.4-py2.py3-none-any.whl", hash = "sha256:da1a3fa8266e30f0ce7e97c6a54eefaae8edd1e5f86f3eb8b95457cae90265ea", size = 38117, upload-time = "2025-11-22T08:28:36.939Z" },
]
[[package]]
name = "markdown-it-py"
version = "4.2.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "mdurl" },
]
sdist = { url = "https://files.pythonhosted.org/packages/06/ff/7841249c247aa650a76b9ee4bbaeae59370dc8bfd2f6c01f3630c35eb134/markdown_it_py-4.2.0.tar.gz", hash = "sha256:04a21681d6fbb623de53f6f364d352309d4094dd4194040a10fd51833e418d49", size = 82454, upload-time = "2026-05-07T12:08:28.36Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/b3/81/4da04ced5a082363ecfa159c010d200ecbd959ae410c10c0264a38cac0f5/markdown_it_py-4.2.0-py3-none-any.whl", hash = "sha256:9f7ebbcd14fe59494226453aed97c1070d83f8d24b6fc3a3bcf9a38092641c4a", size = 91687, upload-time = "2026-05-07T12:08:27.182Z" },
]
[[package]]
name = "mdurl"
version = "0.1.2"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba", size = 8729, upload-time = "2022-08-14T12:40:10.846Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", size = 9979, upload-time = "2022-08-14T12:40:09.779Z" },
]
[[package]]
name = "packaging"
version = "26.2"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/d7/f1/e7a6dd94a8d4a5626c03e4e99c87f241ba9e350cd9e6d75123f992427270/packaging-26.2.tar.gz", hash = "sha256:ff452ff5a3e828ce110190feff1178bb1f2ea2281fa2075aadb987c2fb221661", size = 228134, upload-time = "2026-04-24T20:15:23.917Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/df/b2/87e62e8c3e2f4b32e5fe99e0b86d576da1312593b39f47d8ceef365e95ed/packaging-26.2-py3-none-any.whl", hash = "sha256:5fc45236b9446107ff2415ce77c807cee2862cb6fac22b8a73826d0693b0980e", size = 100195, upload-time = "2026-04-24T20:15:22.081Z" },
]
[[package]]
name = "pefile"
version = "2024.8.26"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/03/4f/2750f7f6f025a1507cd3b7218691671eecfd0bbebebe8b39aa0fe1d360b8/pefile-2024.8.26.tar.gz", hash = "sha256:3ff6c5d8b43e8c37bb6e6dd5085658d658a7a0bdcd20b6a07b1fcfc1c4e9d632", size = 76008, upload-time = "2024-08-26T20:58:38.155Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/54/16/12b82f791c7f50ddec566873d5bdd245baa1491bac11d15ffb98aecc8f8b/pefile-2024.8.26-py3-none-any.whl", hash = "sha256:76f8b485dcd3b1bb8166f1128d395fa3d87af26360c2358fb75b80019b957c6f", size = 74766, upload-time = "2024-08-26T21:01:02.632Z" },
]
[[package]]
name = "pygments"
version = "2.20.0"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/c3/b2/bc9c9196916376152d655522fdcebac55e66de6603a76a02bca1b6414f6c/pygments-2.20.0.tar.gz", hash = "sha256:6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f", size = 4955991, upload-time = "2026-03-29T13:29:33.898Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/f4/7e/a72dd26f3b0f4f2bf1dd8923c85f7ceb43172af56d63c7383eb62b332364/pygments-2.20.0-py3-none-any.whl", hash = "sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176", size = 1231151, upload-time = "2026-03-29T13:29:30.038Z" },
]
[[package]]
name = "pyinstaller"
version = "6.21.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "altgraph" },
{ name = "macholib", marker = "sys_platform == 'darwin'" },
{ name = "packaging" },
{ name = "pefile", marker = "sys_platform == 'win32'" },
{ name = "pyinstaller-hooks-contrib" },
{ name = "pywin32-ctypes", marker = "sys_platform == 'win32'" },
{ name = "setuptools" },
]
sdist = { url = "https://files.pythonhosted.org/packages/d5/4d/ec706c3fcf39e26888c35b39615ff4d5865d184069666c47492cff1fbe50/pyinstaller-6.21.0.tar.gz", hash = "sha256:bb9fab705983e393a2d1cac77d6972513057ad800215fd861dc15ff5272e98fd", size = 4061519, upload-time = "2026-06-13T14:15:06.25Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/0c/4a/53cf98bf66daed012dc9cd78c8203f19a675d696f2fc12afcf8c5049a0e0/pyinstaller-6.21.0-py3-none-macosx_10_13_universal2.whl", hash = "sha256:327d132389f37912609e01be62810cf96b5aa95b613903e4b8692e0d12fb0eda", size = 1052350, upload-time = "2026-06-13T14:13:55.88Z" },
{ url = "https://files.pythonhosted.org/packages/30/83/b591295c352ef464c50b4c6ffff1c4f771d875c9e833f578d1b9f564f6b3/pyinstaller-6.21.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:7071d4b094d5b40deeef5fa3d3b98a1b846087f7562b49209663d5f9281fe251", size = 748477, upload-time = "2026-06-13T14:14:00.327Z" },
{ url = "https://files.pythonhosted.org/packages/3d/8f/88fff4e403873b1e22286911350e75ff00db014aa08e57045da9d4328993/pyinstaller-6.21.0-py3-none-manylinux2014_i686.whl", hash = "sha256:6b6374d652107dd4a2eeece903ff82bb4045bb5e1006c5a158a6dcdbefe84bf2", size = 760877, upload-time = "2026-06-13T14:14:04.836Z" },
{ url = "https://files.pythonhosted.org/packages/8a/13/f0e48fbdfd1d05d948157121cea8b1b823dcb89efe6934b71fdd8bdb3f0f/pyinstaller-6.21.0-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:4e3108b3f02384560da70e39b8bf22b0ad597d02bd68a40d76ea91c1cfa00cad", size = 759194, upload-time = "2026-06-13T14:14:10.61Z" },
{ url = "https://files.pythonhosted.org/packages/dd/d5/ea7878cf9924ed30d946d8288777424e6d069d94f5bde56b4d0890069664/pyinstaller-6.21.0-py3-none-manylinux2014_s390x.whl", hash = "sha256:697532279f535ad572bda613db4f821540e235c7854ca6da4d3bf0373f4415ee", size = 754979, upload-time = "2026-06-13T14:14:15.226Z" },
{ url = "https://files.pythonhosted.org/packages/9f/09/51b8905714b733bac66dbc041a7821372d70d888d273ae474c4037d4202d/pyinstaller-6.21.0-py3-none-manylinux2014_x86_64.whl", hash = "sha256:605169523a6b5ace39f13dfbff21add9f2bc43df99c7daf9394fefb2c45e8b6f", size = 754812, upload-time = "2026-06-13T14:14:20.264Z" },
{ url = "https://files.pythonhosted.org/packages/4b/43/d77779439d8c6c2e27a77bcfbd1d5cc0f568ebb611bb472b11af81b5f177/pyinstaller-6.21.0-py3-none-musllinux_1_1_aarch64.whl", hash = "sha256:5fa56746c1e76f93634d018502301378a2d0c382553d37d8c3c34ff436c12dd1", size = 753887, upload-time = "2026-06-13T14:14:25.268Z" },
{ url = "https://files.pythonhosted.org/packages/51/8f/c22df1f6837784ac349057ba693f08e7b1ca7a0e06f9c33c63bc6280007b/pyinstaller-6.21.0-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:42395ec76df8e8120c36b13339d9db8cab83e316a12839ee303cc00fc941bb74", size = 753779, upload-time = "2026-06-13T14:14:29.445Z" },
{ url = "https://files.pythonhosted.org/packages/c9/76/1ce8a27ce62ba8cf3a87c9ce6d575610f4e55d7cb0123e7512fc3f4b921a/pyinstaller-6.21.0-py3-none-win32.whl", hash = "sha256:c6b28d30d8fd99ce162ff3aab5013ed44dbfb747566b1f01b9bed7964d7c14e9", size = 1336462, upload-time = "2026-06-13T14:14:35.785Z" },
{ url = "https://files.pythonhosted.org/packages/c1/fa/ca1d7e5257dd8566a9dfc0dfb02f8a8075eeb53d4b2d3c579f1276759042/pyinstaller-6.21.0-py3-none-win_amd64.whl", hash = "sha256:7fae06c494ce0ebfe6bd3055c0e409def884f63af2e3705d06bd431ad9237fc7", size = 1397487, upload-time = "2026-06-13T14:14:42.328Z" },
{ url = "https://files.pythonhosted.org/packages/dc/75/21b51523ce8d96629b71311775a0a65f5f5a872124ab0de33e5c848f8bff/pyinstaller-6.21.0-py3-none-win_arm64.whl", hash = "sha256:f13c95c9c03fb567217135919f93815c305813126780b0ed6e0123cb8acaf025", size = 1346094, upload-time = "2026-06-13T14:14:48.914Z" },
]
[[package]]
name = "pyinstaller-hooks-contrib"
version = "2026.6"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "packaging" },
]
sdist = { url = "https://files.pythonhosted.org/packages/94/5b/c9fe0db5e83ee1c39b2258fa21d23b15e1a60786b6c5990ee5074ead8bb6/pyinstaller_hooks_contrib-2026.6.tar.gz", hash = "sha256:bef5002c32f4f50bd55b005da12cff64eca8783e7eaf86a06a62410164bab725", size = 173354, upload-time = "2026-06-08T22:37:16.152Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/e7/31/f2d7343d8ed5f7c4678377886f6ce533e6eaaa131b252ce950114c2a7efa/pyinstaller_hooks_contrib-2026.6-py3-none-any.whl", hash = "sha256:fd13b8ac126b35361175edacd41a0d97080b75dd5f4b594ecefefff969509dd3", size = 457159, upload-time = "2026-06-08T22:37:14.722Z" },
]
[[package]]
name = "python-yakh"
version = "0.4.1"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/d2/77/bbff0a1e6fb03b8cc2cc373a44cfbbb4fd22863c657f8630f4a0f5eb207c/python_yakh-0.4.1.tar.gz", hash = "sha256:da03e800b4f2f5d85344f1668e852687c12dc1a99a03c65cf3dc13a3680da49d", size = 3988, upload-time = "2025-01-14T18:08:15.767Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/22/42/72571b24514b5f59c328f12e5294b246958951b889fac2bd5321e08a4bab/python_yakh-0.4.1-py3-none-any.whl", hash = "sha256:d69507e13e03d09cefd88030f74b6d5369b67de004be975a35be28eb286122e4", size = 5826, upload-time = "2025-01-14T18:08:13.618Z" },
]
[[package]]
name = "pywin32"
version = "312"
source = { registry = "https://pypi.org/simple" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/83/ff/32aa7d2ed0ab12b323aaa64f9b75e6ad4f8fd09f9ccfc28c79414d46838d/pywin32-312-cp312-cp312-win32.whl", hash = "sha256:dab4f65ac9c4e48400a2a0530c46c3c579cd5905ecd11b80692373915269208b", size = 6371877, upload-time = "2026-06-04T07:49:28.836Z" },
{ url = "https://files.pythonhosted.org/packages/03/d9/77040d3b43df3f3be32ea289433d660d2727f5ba327bc73be835127d9d60/pywin32-312-cp312-cp312-win_amd64.whl", hash = "sha256:b457f6d628a47e8a7346ce22acb7e1a46a4a78b52e1d17e1af56871bd19a93bc", size = 6914841, upload-time = "2026-06-04T07:49:31.85Z" },
{ url = "https://files.pythonhosted.org/packages/e3/cc/7b1ec671775756020a0ee7f4feeaf3c568f0ab86bd3900088cf986937a92/pywin32-312-cp312-cp312-win_arm64.whl", hash = "sha256:6017c58e12f6809fbb0555b75df144c2922a9ffd18e4b9b5afa863b6c1a9d950", size = 6727901, upload-time = "2026-06-04T07:49:34.244Z" },
{ url = "https://files.pythonhosted.org/packages/2d/41/12fbfd7f36ed2146d8bc9de96c2741296bf0d490b98508496cff322e274c/pywin32-312-cp313-cp313-win32.whl", hash = "sha256:7a27df850933d16a8eabfbaeb73d52b273e2da667f80d70b01a89d1f6828d02c", size = 6370184, upload-time = "2026-06-04T07:49:36.253Z" },
{ url = "https://files.pythonhosted.org/packages/ba/db/36a78e3403099d31d9746d13fdcde5accc43c1155f375a34d15983a479a7/pywin32-312-cp313-cp313-win_amd64.whl", hash = "sha256:c53e878d15a1c44788082bfe712a905433473aa38f86375b7cf8b45e3acbaaf9", size = 6914298, upload-time = "2026-06-04T07:49:38.876Z" },
{ url = "https://files.pythonhosted.org/packages/84/37/c1697194092b76de9ed47ca124323f02c57ffc8a45c06f88a3d5acaf01eb/pywin32-312-cp313-cp313-win_arm64.whl", hash = "sha256:59aba5d5940842075343a5ddc6b11f1cdf0d1567fe745290359dfbcc7c2eb831", size = 6727640, upload-time = "2026-06-04T07:49:41.083Z" },
{ url = "https://files.pythonhosted.org/packages/fc/2b/1f3cded5822fd49c02f40544cbb5f58c7cfd6b1694869fd476cb6170ee97/pywin32-312-cp314-cp314-win32.whl", hash = "sha256:a77a90fbb6881238d2ca9c6fd797b25817f3768fe78d214a90137ff055a75f5b", size = 6468928, upload-time = "2026-06-04T07:49:43.188Z" },
{ url = "https://files.pythonhosted.org/packages/21/82/3bf86d2e2808902013132e1ce905a7da0da53790f3836c64bf44d55e24f3/pywin32-312-cp314-cp314-win_amd64.whl", hash = "sha256:a4dd3a848290ef724347b19f301045831d8e802fa4464f491b98b1e0a081432e", size = 7024157, upload-time = "2026-06-04T07:49:45.34Z" },
{ url = "https://files.pythonhosted.org/packages/a4/0e/73f6d6800b4f27655abd9e9f6aaeaefcddb2b946e4674efa2bab184a7f7b/pywin32-312-cp314-cp314-win_arm64.whl", hash = "sha256:9fce94568364e0155e6dfb781ac5d95903be8baf28670632beab1b523f300daa", size = 6839598, upload-time = "2026-06-04T07:49:47.613Z" },
{ url = "https://files.pythonhosted.org/packages/eb/61/caa39686032d2ebdd04ff0ab5cbe163126c0066d98e00c9018646e42393b/pywin32-312-cp315-cp315-win32.whl", hash = "sha256:5c1fbe4a937a73ae9297384a3da38518cbc694c68ad8a809b2e19acd350f03ed", size = 6471159, upload-time = "2026-06-04T07:49:50.035Z" },
{ url = "https://files.pythonhosted.org/packages/0f/cd/7e1de64a4a6f69c04214169657ccab0d93a670ea50e35eb8f489d7378249/pywin32-312-cp315-cp315-win_amd64.whl", hash = "sha256:c2f03a0f73f804a13c2735b99392b0cd426bb4f2c4d0178e5ac966a0f21618d5", size = 7025293, upload-time = "2026-06-04T07:49:54.857Z" },
{ url = "https://files.pythonhosted.org/packages/23/ed/4532e9388e65fa16b46776ef47ad631a64eda1631884488af707666350ed/pywin32-312-cp315-cp315-win_arm64.whl", hash = "sha256:a8597d28f267b39074aef51fa593530082b39cbe5a074226096857b1fed2dfb9", size = 6840337, upload-time = "2026-06-04T07:49:57.531Z" },
]
[[package]]
name = "pywin32-ctypes"
version = "0.2.3"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/85/9f/01a1a99704853cb63f253eea009390c88e7131c67e66a0a02099a8c917cb/pywin32-ctypes-0.2.3.tar.gz", hash = "sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755", size = 29471, upload-time = "2024-08-14T10:15:34.626Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/de/3d/8161f7711c017e01ac9f008dfddd9410dff3674334c233bde66e7ba65bbf/pywin32_ctypes-0.2.3-py3-none-any.whl", hash = "sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8", size = 30756, upload-time = "2024-08-14T10:15:33.187Z" },
]
[[package]]
name = "questo"
version = "0.4.2"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "python-yakh" },
{ name = "rich" },
]
sdist = { url = "https://files.pythonhosted.org/packages/a8/e6/4a86ccd5710c2fddae92786f15f2c69637b417905ff239d7424b55e342cb/questo-0.4.2.tar.gz", hash = "sha256:bcc917c2f1a65872e2bd02e79e226a716fd2d68a1ebe0d23c1828aa116aa6da6", size = 10474, upload-time = "2025-11-30T13:08:59.403Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/04/9e/2669ac7d718539a3783c3a6c440b3440b68193b59d763d7f89d33c0b1e8e/questo-0.4.2-py3-none-any.whl", hash = "sha256:1afce34a638601b54fbd697e99e7551813fafb513fe523165394eb12f9607b43", size = 12442, upload-time = "2025-11-30T13:08:57.602Z" },
]
[[package]]
name = "rich"
version = "15.0.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "markdown-it-py" },
{ name = "pygments" },
]
sdist = { url = "https://files.pythonhosted.org/packages/c0/8f/0722ca900cc807c13a6a0c696dacf35430f72e0ec571c4275d2371fca3e9/rich-15.0.0.tar.gz", hash = "sha256:edd07a4824c6b40189fb7ac9bc4c52536e9780fbbfbddf6f1e2502c31b068c36", size = 230680, upload-time = "2026-04-12T08:24:00.75Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/82/3b/64d4899d73f91ba49a8c18a8ff3f0ea8f1c1d75481760df8c68ef5235bf5/rich-15.0.0-py3-none-any.whl", hash = "sha256:33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb", size = 310654, upload-time = "2026-04-12T08:24:02.83Z" },
]
[[package]]
name = "setuptools"
version = "83.0.0"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/34/26/f5d29e25ffdb535afef2d35cdb55b325298f96debd670da4c325e08d70f4/setuptools-83.0.0.tar.gz", hash = "sha256:025bccbbf0fa05b6192bc64ae1e7b16e001fd6d6d4d5de03c97b1c1ade523bef", size = 1154254, upload-time = "2026-07-04T15:31:22.699Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/5d/40/e1e72872c6354b306daef1703549e8e83b4d43cfea356311bf722a043752/setuptools-83.0.0-py3-none-any.whl", hash = "sha256:29b23c360f22f414dc7336bb39178cc7bcbf6021ed2733cde173f09dba19abb3", size = 1008090, upload-time = "2026-07-04T15:31:20.885Z" },
]
[[package]]
name = "xlsx-clean"
version = "0.3.0"
source = { editable = "." }
dependencies = [
{ name = "beaupy" },
{ name = "dearpygui" },
{ name = "pywin32", marker = "sys_platform == 'win32'" },
]
[package.optional-dependencies]
desktop = [
{ name = "pyinstaller" },
]
[package.metadata]
requires-dist = [
{ name = "beaupy", specifier = ">=3.12.0" },
{ name = "dearpygui", specifier = ">=2.0.0" },
{ name = "pyinstaller", marker = "extra == 'desktop'", specifier = ">=6.21.0" },
{ name = "pywin32", marker = "sys_platform == 'win32'", specifier = ">=312" },
]
provides-extras = ["desktop"]