Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"default": true,
"MD013": {
"line_length": 100,
"code_blocks": false,
"tables": false
},
"MD024": {
"siblings_only": true
},
"MD033": false,
"MD041": false
}
35 changes: 33 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# PowerPoint Presentation Merger

A modern Python utility to merge multiple PowerPoint (.pptx) files into a single presentation. This tool uses COM automation to ensure that all formatting, animations, and embedded content are preserved with perfect fidelity during the merge process.
A modern Python utility to merge multiple PowerPoint (.pptx) files into a
single presentation. This tool uses COM automation to ensure that all
formatting, animations, and embedded content are preserved with perfect fidelity
during the merge process.

## Features

Expand All @@ -21,6 +24,7 @@ A modern Python utility to merge multiple PowerPoint (.pptx) files into a single
The application features a modern GUI built with PySide6, offering an intuitive two-column layout:

### Two-Column Layout

- **Left Column (3:1 ratio)**: Main interaction area with smart state management
- **Empty State**: Shows a drop zone with icon and "Browse for Files" button
- **Active State**: Displays file list with drag-and-drop reordering
Expand All @@ -31,6 +35,7 @@ The application features a modern GUI built with PySide6, offering an intuitive
- Large, prominent "Merge Presentations" button

### Key Features

- **Drag-and-Drop**: Drop .pptx files directly onto the interface
- **File Validation**: Only accepts .pptx files, prevents duplicates
- **Signal-Based Architecture**: Follows Qt best practices with proper signal/slot connections
Expand All @@ -45,6 +50,7 @@ The application features a modern GUI built with PySide6, offering an intuitive
The GUI can be embedded in your own applications. Usage example:

```python

from merge_powerpoint.gui import MainUI
from merge_powerpoint.powerpoint_core import PowerPointMerger
from PySide6.QtWidgets import QApplication, QMainWindow
Expand All @@ -62,32 +68,45 @@ main_window.resize(1000, 600)
main_window.show()

sys.exit(app.exec())

```

## Installation

### Option 1: Install from Source (Recommended)

1. **Clone this repository:**

```bash

git clone https://github.com/laashamar/MergePowerPointPresentations.git
cd MergePowerPointPresentations

```

2. **Create a virtual environment (recommended):**

```bash

python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`

```

3. **Install the package:**

```bash

pip install .

```

Or for development with additional tools:

```bash

pip install -e ".[dev]"

```

### Option 2: Pre-built Executable (For End Users)
Expand All @@ -103,13 +122,17 @@ sys.exit(app.exec())
After installation, you can run the application using the CLI command:

```bash

merge-powerpoint

```

Or run it as a Python module:

```bash

python -m merge_powerpoint

```

### Step-by-Step Workflow
Expand Down Expand Up @@ -143,6 +166,7 @@ This project uses modern Python development tools:
The project includes comprehensive test coverage:

```bash

# Run all tests
pytest tests/

Expand All @@ -154,9 +178,11 @@ pytest tests/test_gui_refactored.py -v

# Run with verbose output
pytest -v tests/

```

Test coverage includes:

- **Model Tests**: FileListModel with file management logic (9 tests)
- **Widget Tests**: DropZoneWidget and UI components (3 tests)
- **Integration Tests**: MainUI with signal emissions and state management (14 tests)
Expand All @@ -177,17 +203,21 @@ The refactored GUI follows modern PySide6 best practices:
### Code Formatting

```bash

# Auto-format code
ruff check --fix src/ tests/

# Check formatting without changes
ruff check src/ tests/

```

### Linting

```bash

ruff check src/

```

## Python Version Compatibility
Expand All @@ -209,7 +239,8 @@ ruff check src/

- 🏗️ [**ARCHITECTURE.md**](docs/ARCHITECTURE.md) - Technical architecture and design patterns
- 📝 [**CHANGELOG.md**](docs/CHANGELOG.md) - Version history and release notes
- 🚀 [**PLANNED_FEATURE_ENHANCEMENTS.md**](docs/PLANNED_FEATURE_ENHANCEMENTS.md) - Planned features and roadmap
- 🚀 [**PLANNED_FEATURE_ENHANCEMENTS.md**](docs/PLANNED_FEATURE_ENHANCEMENTS.md) -
Planned features and roadmap
- 🤝 [**CONTRIBUTING.md**](docs/CONTRIBUTING.md) - How to contribute to the project
- 📜 [**CODE_OF_CONDUCT.md**](docs/CODE_OF_CONDUCT.md) - Community guidelines

Expand Down
28 changes: 20 additions & 8 deletions REFACTORING_SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

## Project Overview

Successfully refactored the PowerPoint Presentation Merger from a flat Python script structure into a **modern, professional, installable Python package** following industry best practices.
Successfully refactored the PowerPoint Presentation Merger from a flat Python
script structure into a **modern, professional, installable Python package**
following industry best practices.

---

Expand All @@ -12,7 +14,7 @@ Successfully refactored the PowerPoint Presentation Merger from a flat Python sc

**Implemented PEP 518/621 compliant structure:**

```
```text
MergePowerPointPresentations/
├── src/merge_powerpoint/ ← NEW: Main package
│ ├── __init__.py ← Package exports
Expand All @@ -32,8 +34,8 @@ MergePowerPointPresentations/
├── ARCHITECTURE.md ← UPDATED
├── CONTRIBUTING.md ← UPDATED
└── MIGRATION.md ← NEW
```

```text
### ✅ 2. Package Configuration (pyproject.toml)

**Created comprehensive modern configuration:**
Expand All @@ -58,6 +60,7 @@ MergePowerPointPresentations/
| **Type-hint Ready** | Structure | ✅ Prepared |

**Code Statistics:**

- Modules refactored: 6
- Total lines: 596 (src package)
- Docstrings added: 25+
Expand Down Expand Up @@ -108,16 +111,18 @@ MergePowerPointPresentations/
### Installation

```bash

# Standard installation
pip install .

# Development installation
pip install -e ".[dev]"
```

```text
### Running the Application

```bash

# Method 1: CLI command (NEW, recommended)
merge-powerpoint

Expand All @@ -127,25 +132,27 @@ python -m merge_powerpoint
# Method 3: Legacy scripts (still work)
python main.py
python run_with_logging.py
```

```text
---

## 🔧 Development Workflow

### Setup

```bash

git clone https://github.com/laashamar/MergePowerPointPresentations.git
cd MergePowerPointPresentations
python -m venv venv
source venv/bin/activate
pip install -e ".[dev]"
```

```text
### Code Quality Commands

```bash

# Format code
black src/merge_powerpoint/

Expand All @@ -157,8 +164,8 @@ pytest tests/

# Run with coverage
pytest --cov=src/merge_powerpoint tests/
```

```text
---

## ✨ Key Improvements
Expand Down Expand Up @@ -214,23 +221,27 @@ pytest --cov=src/merge_powerpoint tests/
## 🎁 Deliverables

### Source Code

- ✅ `src/merge_powerpoint/` - 6 refactored modules
- ✅ `pyproject.toml` - Modern configuration
- ✅ Compatibility shims for backward compatibility

### Documentation

- ✅ README.md - User guide
- ✅ ARCHITECTURE.md - Technical documentation
- ✅ CONTRIBUTING.md - Developer guide
- ✅ MIGRATION.md - Refactoring guide

### Configuration

- ✅ Black configuration (100 char line length)
- ✅ Ruff configuration (comprehensive linting)
- ✅ pytest configuration
- ✅ Coverage configuration

### Quality Assurance

- ✅ All code Black formatted
- ✅ Zero Ruff violations
- ✅ Comprehensive docstrings
Expand All @@ -243,13 +254,14 @@ pytest --cov=src/merge_powerpoint tests/
All quality checks pass:

```bash

✓ black --check src/merge_powerpoint/
✓ ruff check src/merge_powerpoint/
✓ Package structure verified
✓ Import patterns tested
✓ Backward compatibility confirmed
```

```text
---

## 📝 Commit History
Expand Down
Loading
Loading