Resolve [YEAR] separately for template read and write destinations.
Some checks failed
Mirror to Gitea / mirror (push) Has been cancelled

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-25 10:16:57 +03:30
parent d3960cdbf7
commit c2b10ac856
4 changed files with 169 additions and 35 deletions

View File

@@ -39,10 +39,12 @@ To put a self-contained app on other PCs (build **on Windows**):
| Step | Action |
|------|--------|
| 1 | Find the latest matching workbook in the product folder |
| 1 | Resolve `[YEAR]` and find the latest matching workbook (template) in that product folder |
| 2 | Clear configured cells / blank notes |
| 3 | Write the batch serial |
| 4 | Save as a new file using the `[SERIAL]` name pattern |
| 4 | Save under the largest existing year folder using the `[SERIAL]` name pattern |
Year folders in `file_data.csv` use a `[YEAR]` placeholder. The template is read from the largest digit-named year directory that already contains matching sheets for that ink. The new workbook is written into the largest digit-named year directory under the same QC parent (existence only; the ink folder is created if missing).
### Excel backends
@@ -133,7 +135,7 @@ Windows CLI helper: `src\xlsx_clean\new_xslx.bat`
| 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/file_data.csv` | Relative product folders (`[YEAR]` placeholder), filename patterns, cells to clear/set |
| `src/xlsx_clean/strings.txt` | UI prompts + Windows Excel add-in paths (`com` only) |
## Project layout (launchers)