include jpgs skipped in skipped count
This commit is contained in:
@@ -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 >= 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 > 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)**_
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ def main():
|
|||||||
print("-" * 80)
|
print("-" * 80)
|
||||||
|
|
||||||
compressed = 0
|
compressed = 0
|
||||||
skipped = 0
|
skipped = len(jpg_files) # Start with JPG files counted as skipped
|
||||||
failed = 0
|
failed = 0
|
||||||
corrupted = 0
|
corrupted = 0
|
||||||
corrupted_files = []
|
corrupted_files = []
|
||||||
@@ -393,9 +393,11 @@ def main():
|
|||||||
print("\n" + "=" * 80)
|
print("\n" + "=" * 80)
|
||||||
print(f"Compression complete!")
|
print(f"Compression complete!")
|
||||||
print(f"Successfully compressed: {compressed} files")
|
print(f"Successfully compressed: {compressed} files")
|
||||||
print(f"Skipped (already exist): {skipped} files")
|
skipped_existing = skipped - len(jpg_files) if skipped >= len(jpg_files) else 0
|
||||||
if jpg_files:
|
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 > 0:
|
if corrupted > 0:
|
||||||
print(f"Corrupted (bad PNGs): {corrupted} files")
|
print(f"Corrupted (bad PNGs): {corrupted} files")
|
||||||
print(f"Failed: {failed} files")
|
print(f"Failed: {failed} files")
|
||||||
|
|||||||
Reference in New Issue
Block a user