Metadata-Version: 2.4
Name: pdf-zipper
Version: 1.0.0
Summary: A powerful PDF compression tool with GUI and CLI interfaces
Project-URL: Homepage, https://github.com/wibus-wee/pdf-zipper
Project-URL: Repository, https://github.com/wibus-wee/pdf-zipper
Project-URL: Issues, https://github.com/wibus-wee/pdf-zipper/issues
Author-email: PDF Zipper Team <team@pdfzipper.com>
License-Expression: MIT
License-File: LICENSE
Keywords: cli,compression,gui,pdf,textual
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Environment :: Console :: Curses
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Office/Business
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Requires-Dist: click>=8.0.0
Requires-Dist: pillow>=10.0.0
Requires-Dist: pymupdf>=1.23.0
Requires-Dist: python-pptx>=0.6.21
Requires-Dist: rich>=13.0.0
Requires-Dist: textual>=0.31.0
Requires-Dist: typer>=0.9.0
Provides-Extra: dev
Requires-Dist: black>=23.0.0; extra == 'dev'
Requires-Dist: flake8>=6.0.0; extra == 'dev'
Requires-Dist: isort>=5.12.0; extra == 'dev'
Requires-Dist: mypy>=1.0.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# 🗜️ PDF Zipper

<div align="center">

![Python](https://img.shields.io/badge/python-3.8+-blue.svg)
![License](https://img.shields.io/badge/license-MIT-green.svg)
![Platform](https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20-lightgrey.svg)
![Status](https://img.shields.io/badge/status-stable-brightgreen.svg)

</div>

A powerful PDF compression tool with both GUI and CLI interfaces, built with modern Python.

## 📸 Screenshots

<div align="center">
<table>
<tr>
<td width="50%">

### 🖥️ Beautiful Terminal GUI
![GUI Interface](./examples/screenshot-gui.png)
*Interactive file browser with drag & drop support*

</td>
<td width="50%">

### ⌨️ Powerful Command Line Interface
![CLI Interface](./examples/screenshot-cli.png)
*Rich output with progress indicators and detailed info*

</td>
</tr>
</table>
</div>

## ✨ Features

- **🎯 Auto Compression**: Automatically compress PDFs to a target file size
- **🔧 Manual Compression**: Compress PDFs with custom DPI settings  
- **📊 PDF to PowerPoint**: Convert PDF pages to PowerPoint slides
- **🖥️ Beautiful GUI**: Modern terminal-based interface using Textual
- **⌨️ CLI Interface**: Full command-line support with rich output
- **📁 Drag & Drop Support**: Easy file selection in GUI mode
- **📦 Easy Installation**: Install as a system command

## 🚀 Installation

### From Source (Current Method)
```bash
git clone https://github.com/your-username/pdf-zipper.git
cd pdf-zipper
pip install -e .
```

### Using Installation Script
```bash
git clone https://github.com/your-username/pdf-zipper.git
cd pdf-zipper
./install.sh
```

### From Built Package (Local)
```bash
# After building the package
pip install dist/pdf_zipper-1.0.0-py3-none-any.whl
```

### Future: From PyPI (Coming Soon)
```bash
# Will be available after publishing to PyPI
pip install pdf-zipper
```

## 📖 Usage

### CLI Commands

After installation, you can use `pdf-zipper` or `pdfzip` commands:

```bash
# Launch GUI
pdf-zipper gui

# Compress PDF to specific size (auto mode)
pdf-zipper compress input.pdf --target-size 5.0

# Compress PDF with specific DPI (manual mode)
pdf-zipper compress input.pdf --dpi 150

# Convert PDF to PowerPoint
pdf-zipper convert input.pdf

# Show PDF information
pdf-zipper info input.pdf

# Show help
pdf-zipper --help
```

The CLI provides rich, colorful output with progress indicators and detailed information (see CLI screenshot above).

### GUI Mode
```bash
pdf-zipper gui
```

The GUI provides an intuitive interface with file browser, drag & drop support, and real-time progress logging (see screenshot above).

### Programmatic Usage
```python
from pdf_zipper import autocompress_pdf, compress_pdf, convert_to_ppt

# Auto compress to 5MB
autocompress_pdf("input.pdf", "output.pdf", 5.0, print)

# Manual compress with 150 DPI
compress_pdf("input.pdf", "output.pdf", 150, print)

# Convert to PowerPoint
convert_to_ppt("input.pdf", "output.pptx", 150, print)
```

## 🛠️ Development

### Setup Development Environment
```bash
git clone https://github.com/your-username/pdf-zipper.git
cd pdf-zipper
pip install -e ".[dev]"
```

### Run Tests
```bash
pytest
```

### Code Formatting
```bash
black src/
isort src/
```

## 📋 Requirements

- Python 3.8+
- PyMuPDF (fitz)
- Pillow
- python-pptx
- rich
- textual
- typer

## 🔧 How It Works

1. **Auto Compression**: Uses binary search to find the optimal DPI that achieves the target file size
2. **Manual Compression**: Converts PDF pages to images at specified DPI and recreates the PDF
3. **PDF to PPT**: Extracts each page as an image and creates PowerPoint slides

## 💡 Tips

- Higher DPI = better quality but larger file size
- Auto compression may take longer but provides precise size control
- For best results, start with the auto compression feature
- Use the GUI for interactive file selection and real-time progress
- Use CLI for batch processing and automation

## 📄 License

MIT License - see [LICENSE](LICENSE) file for details.

## 🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.
