zipseq finalized

This commit is contained in:
Nathan
2025-11-06 11:02:59 -07:00
parent ce9f8da4b9
commit da70801c87
4 changed files with 232 additions and 8 deletions

View File

@@ -1380,3 +1380,221 @@ So whether you launch the script from its original folder, `A:\1 Amazon_Active_P
--- ---
_**User (2025-11-06 17:01Z)**_
ZipSeqArchv and UnzipSeqArchv instantly close without doing anything.
---
_**Agent (model gpt-5-codex, mode Agent)**_
<tool-use data-tool-type="bash" data-tool-name="run_terminal_cmd">
<details><summary>Tool use: **command** • Run command: "A:\1 Amazon_Active_Projects\3 ProjectStructure\ZipSeqArchv.bat"</summary>
```bash
"A:\1 Amazon_Active_Projects\3 ProjectStructure\ZipSeqArchv.bat"
```
```
A:\1 Amazon_Active_Projects\3 ProjectStructure\ZipSeqArchv.bat
```
</details>
</tool-use>
---
<think><details><summary>Thought Process</summary>
**Analyzing silent script execution**</details></think>
---
<tool-use data-tool-type="read" data-tool-name="read_file">
<details><summary>Tool use: **read_file** • Read file: zip_sequences.py</summary>
</details>
</tool-use>
---
<think><details><summary>Thought Process</summary>
**Adding informative messages for no work items**</details></think>
---
<tool-use data-tool-type="write" data-tool-name="edit_file">
<details><summary>Tool use: **code_edit** • Edit file: zip_sequences.py</summary>
**Chunk 1**
Lines added: 4, lines removed: undefined
```diff
@@ -179,4 +179,8 @@
if not work_items:
+ if not RENDER_ROOT.exists():
+ log(&quot;zip&quot;, &quot;Render root &#39;\&quot;Renders\&quot;&#39; not found; nothing to zip.&quot;)
+ else:
+ log(&quot;zip&quot;, &quot;Archives already up to date; no sequences needed zipping.&quot;)
return 0
```
**Chunk 2**
Lines added: 1, lines removed: undefined
```diff
@@ -218,4 +222,5 @@
def run_expand(worker_count: int, *, verbose: bool) -&gt; int:
if not ARCHIVE_ROOT.exists():
+ log(&quot;expand&quot;, &quot;No archives to expand (missing &#39;Renders/_zipped&#39;).&quot;)
return 0
```
**Chunk 3**
Lines added: 1, lines removed: undefined
```diff
@@ -236,4 +241,5 @@
if not work_items:
+ log(&quot;expand&quot;, &quot;Working folders already match archives; nothing to expand.&quot;)
return 0
```
</details>
</tool-use>
---
<think><details><summary>Thought Process</summary>
**Verifying string quoting**</details></think>
---
<tool-use data-tool-type="read" data-tool-name="read_file">
<details><summary>Tool use: **read_file** • Read file: zip_sequences.py</summary>
</details>
</tool-use>
---
<think><details><summary>Thought Process</summary>
**Fixing string quotation marks**</details></think>
---
<tool-use data-tool-type="write" data-tool-name="edit_file">
<details><summary>Tool use: **code_edit** • Edit file: zip_sequences.py</summary>
**Chunk 1**
Lines added: 1, lines removed: 1
```diff
@@ -180,5 +180,5 @@
if not work_items:
if not RENDER_ROOT.exists():
- log(&quot;zip&quot;, &quot;Render root &#39;\&quot;Renders\&quot;&#39; not found; nothing to zip.&quot;)
+ log(&quot;zip&quot;, &quot;Render root &#39;Renders&#39; not found; nothing to zip.&quot;)
else:
log(&quot;zip&quot;, &quot;Archives already up to date; no sequences needed zipping.&quot;)
```
</details>
</tool-use>
---
<think><details><summary>Thought Process</summary>
**Preparing to run test batch**</details></think>
---
<tool-use data-tool-type="bash" data-tool-name="run_terminal_cmd">
<details><summary>Tool use: **command** • Run command: "A:\1 Amazon_Active_Projects\3 ProjectStructure\ZipSeqArchv.bat"</summary>
```bash
"A:\1 Amazon_Active_Projects\3 ProjectStructure\ZipSeqArchv.bat"
```
```
A:\1 Amazon_Active_Projects\3 ProjectStructure\ZipSeqArchv.bat
```
</details>
</tool-use>
---
<think><details><summary>Thought Process</summary>
**Diagnosing missing script output**</details></think>
---
<tool-use data-tool-type="bash" data-tool-name="run_terminal_cmd">
<details><summary>Tool use: **command** • Run command: cmd /c ""A:\1 Amazon_Active_Projects\3 ProjectStructure\ZipSeqArchv.bat" && pause"</summary>
```bash
cmd /c ""A:\1 Amazon_Active_Projects\3 ProjectStructure\ZipSeqArchv.bat" && pause"
```
```
&#39;A:\1&#39; is not recognized as an internal or external command,
operable program or batch file.
```
</details>
</tool-use>
---
<think><details><summary>Thought Process</summary>
**Adjusting command syntax for paths with spaces**</details></think>
---
<tool-use data-tool-type="bash" data-tool-name="run_terminal_cmd">
<details><summary>Tool use: **command** • Run command: cmd /c ""A:\1 Amazon_Active_Projects\3 ProjectStructure\ZipSeqArchv.bat" & pause"</summary>
```bash
cmd /c ""A:\1 Amazon_Active_Projects\3 ProjectStructure\ZipSeqArchv.bat" & pause"
```
```
&#39;A:\1&#39; is not recognized as an internal or external command,
operable program or batch file.
```
</details>
</tool-use>
---
<think><details><summary>Thought Process</summary>
**Testing command quoting syntax**</details></think>
---
Cancelled
---
_**User (2025-11-06 17:01Z)**_
@powershell (1-3)ah. let's design it to be ran from the Renders location it's copied to.
---
_**Agent (model gpt-5-codex, mode Agent)**_
---

View File

@@ -1,17 +1,17 @@
@echo off @echo off
setlocal setlocal
set "REPO_ROOT=%~dp0" set "REN_DIR=%~dp0"
for %%I in ("%REN_DIR%..") do set "PROJ_ROOT=%%~fI"
set "PY_SCRIPT=A:\1 Amazon_Active_Projects\3 ProjectStructure\zip_sequences.py" set "PY_SCRIPT=A:\1 Amazon_Active_Projects\3 ProjectStructure\zip_sequences.py"
pushd "%REPO_ROOT%" >nul 2>&1
if not exist "%PY_SCRIPT%" ( if not exist "%PY_SCRIPT%" (
echo Missing %PY_SCRIPT% echo Missing %PY_SCRIPT%
popd >nul 2>&1
exit /b 1 exit /b 1
) )
pushd "%PROJ_ROOT%" >nul 2>&1
python "%PY_SCRIPT%" --mode expand --verbose %* python "%PY_SCRIPT%" --mode expand --verbose %*
set "ERR=%ERRORLEVEL%" set "ERR=%ERRORLEVEL%"

View File

@@ -1,17 +1,17 @@
@echo off @echo off
setlocal setlocal
set "REPO_ROOT=%~dp0" set "REN_DIR=%~dp0"
for %%I in ("%REN_DIR%..") do set "PROJ_ROOT=%%~fI"
set "PY_SCRIPT=A:\1 Amazon_Active_Projects\3 ProjectStructure\zip_sequences.py" set "PY_SCRIPT=A:\1 Amazon_Active_Projects\3 ProjectStructure\zip_sequences.py"
pushd "%REPO_ROOT%" >nul 2>&1
if not exist "%PY_SCRIPT%" ( if not exist "%PY_SCRIPT%" (
echo Missing %PY_SCRIPT% echo Missing %PY_SCRIPT%
popd >nul 2>&1
exit /b 1 exit /b 1
) )
pushd "%PROJ_ROOT%" >nul 2>&1
python "%PY_SCRIPT%" --verbose %* python "%PY_SCRIPT%" --verbose %*
set "ERR=%ERRORLEVEL%" set "ERR=%ERRORLEVEL%"

View File

@@ -178,6 +178,10 @@ def run_zip(worker_count: int, *, verbose: bool) -> int:
work_items.append((seq_dir, zip_path, state_path, seq_state)) work_items.append((seq_dir, zip_path, state_path, seq_state))
if not work_items: if not work_items:
if not RENDER_ROOT.exists():
log("zip", "Render root 'Renders' not found; nothing to zip.")
else:
log("zip", "Archives already up to date; no sequences needed zipping.")
return 0 return 0
updated_paths: list[Path] = [] updated_paths: list[Path] = []
@@ -217,6 +221,7 @@ def run_zip(worker_count: int, *, verbose: bool) -> int:
def run_expand(worker_count: int, *, verbose: bool) -> int: def run_expand(worker_count: int, *, verbose: bool) -> int:
if not ARCHIVE_ROOT.exists(): if not ARCHIVE_ROOT.exists():
log("expand", "No archives to expand (missing 'Renders/_zipped').")
return 0 return 0
work_items: list[tuple[Path, dict]] = [] work_items: list[tuple[Path, dict]] = []
@@ -235,6 +240,7 @@ def run_expand(worker_count: int, *, verbose: bool) -> int:
work_items.append((zip_path, seq_state)) work_items.append((zip_path, seq_state))
if not work_items: if not work_items:
log("expand", "Working folders already match archives; nothing to expand.")
return 0 return 0
total = len(work_items) total = len(work_items)