include jpgs skipped in skipped count

This commit is contained in:
Nathan
2025-12-11 15:32:18 -07:00
parent 4416949d7c
commit 1885b1d55d
2 changed files with 176 additions and 3 deletions

View File

@@ -3770,3 +3770,174 @@ Also updated `.gitignore` to ignore the `corrupted` folder. When you run the scr
---
_**User (2025-12-11 21:39Z)**_
@pwsh (506-528) jpegs should be included in the skipped count (Skipped: 0)
---
_**Agent (model default, mode Agent)**_
---
Updating the script to count JPG/JPEG files as skipped:
---
<tool-use data-tool-type="read" data-tool-name="read_file">
<details><summary>Tool use: **read_file** • Read file: compress_pngs.py</summary>
</details>
</tool-use>
---
---
---
<tool-use data-tool-type="read" data-tool-name="read_file">
<details><summary>Tool use: **read_file** • Read file: compress_pngs.py</summary>
</details>
</tool-use>
---
---
---
<tool-use data-tool-type="write" data-tool-name="search_replace">
<details><summary>Tool use: **search_replace** • Edit file: compress_pngs.py</summary>
**Chunk 1**
Lines added: 1, lines removed: 1
```diff
@@ -317,5 +317,5 @@
compressed = 0
- skipped = 0
+ skipped = len(jpg_files) # Start with JPG files counted as skipped
failed = 0
corrupted = 0
```
</details>
</tool-use>
---
<tool-use data-tool-type="write" data-tool-name="search_replace">
<details><summary>Tool use: **search_replace** • Edit file: compress_pngs.py</summary>
**Chunk 1**
Lines added: 4, lines removed: 2
```diff
@@ -394,7 +394,9 @@
print(f"Compression complete!")
print(f"Successfully compressed: {compressed} files")
- print(f"Skipped (already exist): {skipped} files")
+ skipped_existing = skipped - len(jpg_files) if skipped &gt;= len(jpg_files) else 0
if jpg_files:
- print(f"Ignored (JPG/JPEG): {len(jpg_files)} files")
+ print(f"Skipped: {skipped} files ({skipped_existing} already exist, {len(jpg_files)} JPG/JPEG)")
+ else:
+ print(f"Skipped (already exist): {skipped} files")
if corrupted &gt; 0:
print(f"Corrupted (bad PNGs): {corrupted} files")
```
</details>
</tool-use>
---
<tool-use data-tool-type="generic" data-tool-name="read_lints">
<details>
<summary>Tool use: **read_lints** • Read lints for 1 file</summary>
Lint paths:
- `compress_pngs.py`
Lint results
**No lint errors found**
</details>
</tool-use>
---
---
Updating the progress display to show the correct total, including JPG files:
---
<tool-use data-tool-type="read" data-tool-name="read_file">
<details><summary>Tool use: **read_file** • Read file: compress_pngs.py</summary>
</details>
</tool-use>
---
---
Updated the script to count JPG/JPEG files as skipped. Changes:
1. **Initialize skipped count** with the number of JPG files found
2. **Progress display** shows the total skipped count (including JPGs)
3. **Final summary** shows skipped files with a breakdown: `Skipped: X files (Y already exist, Z JPG/JPEG)`
When you run the script, JPG files are included in the skipped count from the start, so you'll see something like:
- `Skipped: 803` (if all 803 are JPGs)
- Or `Skipped: 805` (if 803 are JPGs and 2 PNGs were already processed)
The summary will show the breakdown of what was skipped.
---
_**User (2025-12-11 21:39Z)**_
for this script, which wins, a 7800x3d, or a threadripper 1950X?
---
_**Agent (model default, mode Agent)**_
---