Neue Sturktur
This commit is contained in:
64
README.md
64
README.md
@@ -1,37 +1,47 @@
|
||||
|
||||
# PPTX Image Compressor (CaesiumCLT only)
|
||||
**Version 1.0.0**
|
||||
|
||||
Ein CLI‑Tool, das **PPTX-Dateien** entpackt, alle Bilder in `ppt/media` mit **CaesiumCLT** komprimiert und anschließend wieder zu einer PPTX packt.
|
||||
Es ersetzt nur dann Bilder, **wenn die komprimierte Version kleiner ist**, schreibt ein **CSV-Log** und zeigt eine **Fortschrittsanzeige** sowie eine **Summary inkl. Laufzeit** an.
|
||||
Dieses Paket enthält:
|
||||
|
||||
---
|
||||
```
|
||||
PPTX-Image-Compressor-1.0.0/
|
||||
├─ README.md
|
||||
├─ install_and_run.bat
|
||||
├─ pptx_image_compress.py
|
||||
├─ bin/
|
||||
│ └─ PUT_caesiumclt_here.txt
|
||||
└─ samples/
|
||||
└─ README.txt
|
||||
```
|
||||
|
||||
## Features
|
||||
- **Nur CaesiumCLT** als Bildkompressor (keine Pillow-Abhängigkeit).
|
||||
- Unterstützte Bildtypen: **JPG/JPEG, PNG, WebP** (GIF wird übersprungen).
|
||||
- **Overwrite-Policy:** `-O bigger` (nur überschreiben, wenn Ziel größer ist).
|
||||
- **Multi-Threading**: Parallele Bildverarbeitung.
|
||||
- **Log** (`.log` neben der Output-Datei) mit:
|
||||
`image_name,size_before,size_after,saving,saving_percent`.
|
||||
- **Sauberes Cleanup**: Keine Caesium-Tempdateien in der finalen PPTX.
|
||||
## Schnellstart (ohne Admin-Rechte)
|
||||
1) Lege `caesiumclt.exe` in den Ordner `bin/` **oder** sorge dafür, dass es im `PATH` liegt.
|
||||
2) Doppelklicke `install_and_run.bat` **oder** rufe es in CMD/PowerShell auf, z. B.:
|
||||
|
||||
---
|
||||
```bat
|
||||
install_and_run.bat -i "C:\Slides\Deck.pptx" -t 8
|
||||
```
|
||||
|
||||
## Systemvoraussetzungen
|
||||
- **Windows 10/11 (64-bit)**
|
||||
- **Keine Admin-Rechte erforderlich**
|
||||
- **CaesiumCLT** (portabler Download)
|
||||
- **Python** (portabel, ohne Installation) **oder** fertige EXE
|
||||
Die Batch lädt bei Bedarf automatisch das **Windows Embeddable Python Package**, entpackt es lokal und führt das Tool aus.
|
||||
|
||||
---
|
||||
## Was das Tool macht
|
||||
- Entpackt die PPTX in einen Temp‑Ordner
|
||||
- Komprimiert **JPG/JPEG, PNG, WebP** mit **CaesiumCLT** (`-q 90`, `-O bigger`)
|
||||
- Ersetzt Bilder nur, wenn die komprimierte Datei kleiner ist
|
||||
- Schreibt ein CSV‑Log (`.log` neben der Output‑PPTX)
|
||||
- Baut eine neue PPTX und zeigt eine Summary (Name, Größe vorher/nachher, Ersparnis %, Zeit)
|
||||
- Räumt alle temporären Dateien auf (keine Caesium‑Tempfiles in der finalen PPTX)
|
||||
|
||||
## Installation & Setup
|
||||
## Hinweise
|
||||
- **GIF** wird übersprungen (keine Rekodierung).
|
||||
- `-t` steuert die Parallelität (Python‑Threads); intern wird `caesiumclt --threads 1` gesetzt, sobald `-t > 1`, um Oversubscription zu vermeiden.
|
||||
|
||||
### 1) CaesiumCLT installieren
|
||||
1. Lade **CaesiumCLT** von GitHub herunter:
|
||||
[https://github.com/Lymphatus/caesium-clt/releases](https://github.com/Lymphatus/caesium-clt)
|
||||
2. Entpacke `caesiumclt.exe` in einen Ordner, z. B. `C:\Tools\caesiumclt`.
|
||||
3. Füge den Ordner temporär zum PATH hinzu (optional):
|
||||
```bat
|
||||
set PATH=C:\Tools\caesiumclt;%PATH%
|
||||
```
|
||||
## Manuelle Nutzung des .py (falls Python vorhanden)
|
||||
```bat
|
||||
python pptx_image_compress.py -i "C:\Pfad\input.pptx" -t 8
|
||||
```
|
||||
|
||||
## Quellen & Tools
|
||||
- CaesiumCLT – Projekt/Downloads: https://github.com/Lymphatus/caesium-clt
|
||||
- Windows Embeddable Python Package – Doku/Downloads: https://docs.python.org/3/using/windows.html
|
||||
|
||||
Reference in New Issue
Block a user