ppt-translator


Nameppt-translator JSON
Version 0.1.5 PyPI version JSON
download
home_pageNone
SummaryAI-powered PowerPoint presentation translator using Amazon Bedrock
upload_time2025-08-22 15:25:21
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseMIT License Copyright (c) 2025 Daekeun Kim Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords ai bedrock powerpoint ppt presentation translation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PowerPoint Translator using Amazon Bedrock

A powerful PowerPoint translation tool that leverages Amazon Bedrock models for high-quality translation. This service can be used both as a standalone command-line tool and as a FastMCP (Fast Model Context Protocol) service for integration with AI assistants like Amazon Q Developer. It translates PowerPoint presentations while preserving formatting and structure.

## Features

- **PowerPoint Translation**: Translate text content in PowerPoint presentations
- **Amazon Bedrock Integration**: Uses Amazon Bedrock models for high-quality translation
- **Format Preservation**: Maintains original formatting, layouts, and styles
- **Language-Specific Fonts**: Automatically applies appropriate fonts for target languages
- **Color & Style Preservation**: Preserves original text colors and formatting even for untranslated content
- **Standalone & MCP Support**: Use as a command-line tool or integrate with AI assistants via FastMCP
- **Multiple Languages**: Supports translation between various languages
- **Batch Processing**: Can handle multiple slides and text elements efficiently
- **Selective Translation**: Translate entire presentations or specific slides

## Examples

### Translation

The PowerPoint Translator maintains the original formatting while accurately translating content:

<table>
<tr>
<td><img src="imgs/original-en-complex.png" alt="English" width="450"/></td>
<td><img src="imgs/translated-ko-complex.png" alt="Korean Example" width="450"/></td>
</tr>
<tr>
<td align="center"><em>Original presentation slide in English <br> with complex layout</em></td>
<td align="center"><em>Same presentation translated to Korean <br> with preserved formatting and layout</em></td>
</tr>
</table>

### Kiro MCP Examples

![kiro1](imgs/kiro-example1.png)

![kiro2](imgs/kiro-example2.png)

![kiro3](imgs/kiro-example3.png)

### Usage Examples

**Translate entire presentation:**

```bash
uv run python server.py --translate --input-file presentation.pptx --target-language ko
```

![standalone](imgs/standalone.png)

**Translate specific slides:**

```bash
uv run python server.py --translate-slides "1,3,5" --input-file presentation.pptx --target-language ja
```

**Get slide information:**

```bash
uv run python server.py --slide-info --input-file presentation.pptx
```

![get-slideinfo](imgs/get-slideinfo.png)

## ⚠️ Important Security & Cost Notice

**PPT-Translator uses YOUR AWS credentials and charges YOUR AWS account for Bedrock usage.**

### 💰 Cost Information

- Estimated cost: $0.01 - $1.00+ per presentation
- All charges billed directly to your AWS account
- Built-in usage limits: 10/day, 100/month (configurable)
- See [SECURITY.md](SECURITY.md) for detailed cost management

### 🔐 Security Features

- Interactive cost warnings before translation
- Daily and monthly usage limits
- File size restrictions (50MB max)
- Local usage tracking and statistics
- Optional API key authentication

## Prerequisites

- Python 3.11 or higher
- AWS Account with Bedrock access
- AWS CLI configured with appropriate credentials
- Access to Amazon Bedrock models (e.g., Claude, Nova, etc.)
- **Understanding of AWS Bedrock pricing**

### AWS Credentials Setup

⚠️ **CRITICAL**: These credentials will be used to charge YOUR AWS account for Bedrock usage.

Before using this service, ensure your AWS credentials are properly configured. You have several options:

1. **AWS CLI Configuration (Recommended)**:

   ```bash
   aws configure
   ```

   This will prompt you for:

   - AWS Access Key ID
   - AWS Secret Access Key
   - Default region name
   - Default output format

2. **AWS Profile Configuration**:

   ```bash
   aws configure --profile your-profile-name
   ```

3. **Environment Variables** (if needed):

   ```bash
   export AWS_ACCESS_KEY_ID=your_access_key
   export AWS_SECRET_ACCESS_KEY=your_secret_key
   export AWS_DEFAULT_REGION=us-east-1
   ```

4. **IAM Roles** (when running on EC2 instances)

The service will automatically use your configured AWS credentials. You can specify which profile to use in the `.env` file.

### 🛡️ Security Configuration (Recommended)

For production use or shared environments, enable authentication:

```bash
# Enable authentication
export PPT_TRANSLATOR_REQUIRE_AUTH=true
export PPT_TRANSLATOR_API_KEY=$(openssl rand -hex 32)

# Set usage limits
export PPT_TRANSLATOR_DAILY_LIMIT=5
export PPT_TRANSLATOR_MONTHLY_LIMIT=30

# Set file size limit (MB)
export PPT_TRANSLATOR_MAX_FILE_SIZE_MB=25
```

See [SECURITY.md](SECURITY.md) for comprehensive security guidelines.

## Installation

1. **Clone the repository**:

   ```bash
   git clone https://github.com/daekeun-ml/ppt-translator
   cd ppt-translator
   ```

2. **Install dependencies using uv (recommended)**:

   ```bash
   uv sync
   ```

   Or using pip:

   ```bash
   pip install -r requirements.txt
   ```

3. **Set up environment variables**:

   ```bash
   cp .env.example .env
   ```

   Edit `.env` file with your configuration:

   ```bash
   # AWS Configuration
   AWS_REGION=us-east-1
   AWS_PROFILE=default

   # Translation Configuration
   DEFAULT_TARGET_LANGUAGE=ko
   BEDROCK_MODEL_ID=us.anthropic.claude-3-7-sonnet-20250219-v1:0

   # Translation Settings
   MAX_TOKENS=4000
   TEMPERATURE=0.1
   ENABLE_POLISHING=true
   BATCH_SIZE=20
   CONTEXT_THRESHOLD=5

   # Font Settings by Language
   FONT_KOREAN=맑은 고딕
   FONT_JAPANESE=Yu Gothic UI
   FONT_ENGLISH=Amazon Ember
   FONT_CHINESE=Microsoft YaHei
   FONT_DEFAULT=Arial

   # Debug Settings
   DEBUG=false

   # Post-processing Settings
   ENABLE_TEXT_AUTOFIT=true
   TEXT_LENGTH_THRESHOLD=10
   ```

   **Note**: AWS credentials (Access Key ID and Secret Access Key) are not needed in the `.env` file if you have already configured them using `aws configure`. The service will automatically use your AWS CLI credentials.

## Usage

### Standalone Command-Line Usage

The PowerPoint Translator can be used directly from the command line:

```bash
# Translate entire presentation to Korean
uv run python server.py --translate --input-file orig.pptx --target-language ko

# Translate specific slides (individual slides)
uv run python server.py --translate-slides "1,3,5" --input-file orig.pptx --target-language ko

# Translate slide range
uv run python server.py --translate-slides "2-4" --input-file orig.pptx --target-language ko

# Translate mixed (individual + range)
uv run python server.py --translate-slides "1,3-5,8" --input-file orig.pptx --target-language ko

# Get slide information and previews
uv run python server.py --slide-info --input-file orig.pptx

# Using python directly
python server.py --translate --input-file orig.pptx --target-language ko
python server.py --translate-slides "1,3" --input-file orig.pptx --target-language ko
```

### FastMCP Server Mode (for AI Assistant Integration)

Start the FastMCP server for integration with AI assistants like Amazon Q Developer:

```bash
# Using uv (recommended)
uv run python server.py --mcp

# Using python directly
python server.py --mcp
```

## FastMCP Setup (Amazon Q Developer and Kiro)

If you haven't already installed Amazon Q Developer or Kiro, please refer to this:

- Amazon Q Developer CLI: https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-installing.html
- Kiro: https://kiro.dev

### 2. Configure FastMCP Server

Create or update your Q Developer FastMCP configuration file:

#### Kiro

**User Level** `~/.kiro/settings/mcp.json`

#### Amazon Q Developer

**On macOS/Linux**: `~/.aws/amazonq/mcp.json`
**On Windows**: `%APPDATA%\amazonq\mcp.json`

Add the PowerPoint Translator FastMCP server configuration:

```json
{
  "mcpServers": {
    "ppt-translator": {
      "command": "python",
      "args": ["/path/to/ppt-translator/fastmcp_server.py"],
      "env": {
        "AWS_REGION": "us-east-1",
        "AWS_PROFILE": "default",
        "BEDROCK_MODEL_ID": "us.anthropic.claude-3-7-sonnet-20250219-v1:0"
      },
      "disabled": false,
      "autoApprove": [
        "translate_powerpoint",
        "get_slide_info",
        "get_slide_preview",
        "translate_specific_slides"
      ]
    }
  }
}
```

**Important**: Replace `/path/to/ppt-translator/` with the actual path to your cloned repository.

### 3. Verify FastMCP Server

Test that the FastMCP server is working:

```bash
# Navigate to your project directory
cd /path/to/ppt-translator

# Test the FastMCP server using uv
uv run python server.py --mcp --test

# Or test using python directly
python server.py --mcp --test
```

### 4. Use PowerPoint Translation

Once connected, you can use commands like (User input does not have to be in English):

```
Translate original.pptx to Korean
```

```
Please translate slides 10 to 13 of original.pptx into Japanese.
```

## Available FastMCP Tools

The FastMCP server provides the following tools:

- **`translate_powerpoint`**: Translate an entire PowerPoint presentation

  - Parameters:
    - `input_file`: Path to the input PowerPoint file (.pptx)
    - `target_language`: Target language code (default: 'ko')
    - `output_file`: Path for the translated output file (optional, auto-generated)
    - `model_id`: Amazon Bedrock model ID (default: Claude 3.7 Sonnet)
    - `enable_polishing`: Enable natural language polishing (default: true)

- **`translate_specific_slides`**: Translate only specific slides in a PowerPoint presentation

  - Parameters:
    - `input_file`: Path to the input PowerPoint file (.pptx)
    - `slide_numbers`: Comma-separated slide numbers to translate (e.g., "1,3,5" or "2-4,7")
    - `target_language`: Target language code (default: 'ko')
    - `output_file`: Path for the translated output file (optional, auto-generated)
    - `model_id`: Amazon Bedrock model ID (default: Claude 3.7 Sonnet)
    - `enable_polishing`: Enable natural language polishing (default: true)

- **`get_slide_info`**: Get information about slides in a PowerPoint presentation

  - Parameters:
    - `input_file`: Path to the PowerPoint file (.pptx)
  - Returns: Overview with slide count and preview of each slide's content

- **`get_slide_preview`**: Get detailed preview of a specific slide's content

  - Parameters:
    - `input_file`: Path to the PowerPoint file (.pptx)
    - `slide_number`: Slide number to preview (1-based indexing)

- **`list_supported_languages`**: List all supported target languages for translation

- **`list_supported_models`**: List all supported Amazon Bedrock models

- **`get_translation_help`**: Get help information about using the translator

## Configuration

### Environment Variables

- `AWS_REGION`: AWS region for Bedrock service (default: us-east-1)
- `AWS_PROFILE`: AWS profile to use (default: default)
- `DEFAULT_TARGET_LANGUAGE`: Default target language for translation (default: ko)
- `BEDROCK_MODEL_ID`: Bedrock model ID for translation (default: us.anthropic.claude-3-7-sonnet-20250219-v1:0)
- `MAX_TOKENS`: Maximum tokens for translation requests (default: 4000)
- `TEMPERATURE`: Temperature setting for AI model (default: 0.1)
- `ENABLE_POLISHING`: Enable translation polishing (default: true)
- `BATCH_SIZE`: Number of texts to process in a batch (default: 20)
- `CONTEXT_THRESHOLD`: Number of texts to trigger context-aware translation (default: 5)
- `DEBUG`: Enable debug logging (default: false)

### Supported Languages

The service supports translation between major languages including:

- English (en)
- Korean (ko)
- Japanese (ja)
- Chinese Simplified (zh)
- Chinese Traditional (zh-tw)
- Spanish (es)
- French (fr)
- German (de)
- Italian (it)
- Portuguese (pt)
- Russian (ru)
- Arabic (ar)
- Hindi (hi)
- And many more...

## Troubleshooting

### Common Issues

1. **AWS Credentials Not Found**:

   - Ensure AWS credentials are properly configured
   - Check AWS CLI configuration: `aws configure list`

2. **Bedrock Access Denied**:

   - Verify your AWS account has access to Bedrock
   - Check if the specified model is available in your region

3. **FastMCP Connection Issues**:

   - Verify the path in mcp.json is correct
   - Check that Python and dependencies are properly installed
   - Review logs in Q Developer for error messages
   - Test the server: `uv run python server.py --mcp --test`

4. **PowerPoint File Issues**:

   - Ensure the input file is a valid PowerPoint (.pptx) file
   - Check file permissions for both input and output paths

5. **Module Import Errors**:
   - Use `uv run` to ensure proper virtual environment activation
   - Install dependencies: `uv sync`

## Development

### Project Structure

```
ppt-translator/
├── server.py              # Main server entry point (standalone & MCP)
├── fastmcp_server.py      # FastMCP server implementation
├── ppt_handler.py         # PowerPoint processing logic
├── translation_engine.py  # Translation service
├── bedrock_client.py      # Amazon Bedrock client
├── post_processing.py     # Post-processing utilities for translations
├── config.py             # Configuration management
├── dependencies.py       # Dependency management
├── text_utils.py         # Text processing utilities
├── prompts.py            # Translation prompts
├── requirements.txt      # Python dependencies
├── pyproject.toml        # Project configuration (uv)
└── imgs/                 # Example images and screenshots
```

### Using uv for Development

This project uses `uv` for dependency management:

```bash
# Install dependencies
uv sync

# Run the server
uv run python server.py --mcp

# Run tests
uv run python server.py --mcp --test

# Add new dependencies
uv add package-name

# Update dependencies
uv sync --upgrade
```

## License

This project is licensed under the MIT License - see the LICENSE file for details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ppt-translator",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "PPT-Translator Team <contact@ppt-translator.com>",
    "keywords": "ai, bedrock, powerpoint, ppt, presentation, translation",
    "author": null,
    "author_email": "PPT-Translator Team <contact@ppt-translator.com>",
    "download_url": "https://files.pythonhosted.org/packages/e5/ea/25ae1a240ffa4d57ce3bf98e7a1f47048f1e1c7407cf980c6fe7fe4e88a9/ppt_translator-0.1.5.tar.gz",
    "platform": null,
    "description": "# PowerPoint Translator using Amazon Bedrock\n\nA powerful PowerPoint translation tool that leverages Amazon Bedrock models for high-quality translation. This service can be used both as a standalone command-line tool and as a FastMCP (Fast Model Context Protocol) service for integration with AI assistants like Amazon Q Developer. It translates PowerPoint presentations while preserving formatting and structure.\n\n## Features\n\n- **PowerPoint Translation**: Translate text content in PowerPoint presentations\n- **Amazon Bedrock Integration**: Uses Amazon Bedrock models for high-quality translation\n- **Format Preservation**: Maintains original formatting, layouts, and styles\n- **Language-Specific Fonts**: Automatically applies appropriate fonts for target languages\n- **Color & Style Preservation**: Preserves original text colors and formatting even for untranslated content\n- **Standalone & MCP Support**: Use as a command-line tool or integrate with AI assistants via FastMCP\n- **Multiple Languages**: Supports translation between various languages\n- **Batch Processing**: Can handle multiple slides and text elements efficiently\n- **Selective Translation**: Translate entire presentations or specific slides\n\n## Examples\n\n### Translation\n\nThe PowerPoint Translator maintains the original formatting while accurately translating content:\n\n<table>\n<tr>\n<td><img src=\"imgs/original-en-complex.png\" alt=\"English\" width=\"450\"/></td>\n<td><img src=\"imgs/translated-ko-complex.png\" alt=\"Korean Example\" width=\"450\"/></td>\n</tr>\n<tr>\n<td align=\"center\"><em>Original presentation slide in English <br> with complex layout</em></td>\n<td align=\"center\"><em>Same presentation translated to Korean <br> with preserved formatting and layout</em></td>\n</tr>\n</table>\n\n### Kiro MCP Examples\n\n![kiro1](imgs/kiro-example1.png)\n\n![kiro2](imgs/kiro-example2.png)\n\n![kiro3](imgs/kiro-example3.png)\n\n### Usage Examples\n\n**Translate entire presentation:**\n\n```bash\nuv run python server.py --translate --input-file presentation.pptx --target-language ko\n```\n\n![standalone](imgs/standalone.png)\n\n**Translate specific slides:**\n\n```bash\nuv run python server.py --translate-slides \"1,3,5\" --input-file presentation.pptx --target-language ja\n```\n\n**Get slide information:**\n\n```bash\nuv run python server.py --slide-info --input-file presentation.pptx\n```\n\n![get-slideinfo](imgs/get-slideinfo.png)\n\n## \u26a0\ufe0f Important Security & Cost Notice\n\n**PPT-Translator uses YOUR AWS credentials and charges YOUR AWS account for Bedrock usage.**\n\n### \ud83d\udcb0 Cost Information\n\n- Estimated cost: $0.01 - $1.00+ per presentation\n- All charges billed directly to your AWS account\n- Built-in usage limits: 10/day, 100/month (configurable)\n- See [SECURITY.md](SECURITY.md) for detailed cost management\n\n### \ud83d\udd10 Security Features\n\n- Interactive cost warnings before translation\n- Daily and monthly usage limits\n- File size restrictions (50MB max)\n- Local usage tracking and statistics\n- Optional API key authentication\n\n## Prerequisites\n\n- Python 3.11 or higher\n- AWS Account with Bedrock access\n- AWS CLI configured with appropriate credentials\n- Access to Amazon Bedrock models (e.g., Claude, Nova, etc.)\n- **Understanding of AWS Bedrock pricing**\n\n### AWS Credentials Setup\n\n\u26a0\ufe0f **CRITICAL**: These credentials will be used to charge YOUR AWS account for Bedrock usage.\n\nBefore using this service, ensure your AWS credentials are properly configured. You have several options:\n\n1. **AWS CLI Configuration (Recommended)**:\n\n   ```bash\n   aws configure\n   ```\n\n   This will prompt you for:\n\n   - AWS Access Key ID\n   - AWS Secret Access Key\n   - Default region name\n   - Default output format\n\n2. **AWS Profile Configuration**:\n\n   ```bash\n   aws configure --profile your-profile-name\n   ```\n\n3. **Environment Variables** (if needed):\n\n   ```bash\n   export AWS_ACCESS_KEY_ID=your_access_key\n   export AWS_SECRET_ACCESS_KEY=your_secret_key\n   export AWS_DEFAULT_REGION=us-east-1\n   ```\n\n4. **IAM Roles** (when running on EC2 instances)\n\nThe service will automatically use your configured AWS credentials. You can specify which profile to use in the `.env` file.\n\n### \ud83d\udee1\ufe0f Security Configuration (Recommended)\n\nFor production use or shared environments, enable authentication:\n\n```bash\n# Enable authentication\nexport PPT_TRANSLATOR_REQUIRE_AUTH=true\nexport PPT_TRANSLATOR_API_KEY=$(openssl rand -hex 32)\n\n# Set usage limits\nexport PPT_TRANSLATOR_DAILY_LIMIT=5\nexport PPT_TRANSLATOR_MONTHLY_LIMIT=30\n\n# Set file size limit (MB)\nexport PPT_TRANSLATOR_MAX_FILE_SIZE_MB=25\n```\n\nSee [SECURITY.md](SECURITY.md) for comprehensive security guidelines.\n\n## Installation\n\n1. **Clone the repository**:\n\n   ```bash\n   git clone https://github.com/daekeun-ml/ppt-translator\n   cd ppt-translator\n   ```\n\n2. **Install dependencies using uv (recommended)**:\n\n   ```bash\n   uv sync\n   ```\n\n   Or using pip:\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. **Set up environment variables**:\n\n   ```bash\n   cp .env.example .env\n   ```\n\n   Edit `.env` file with your configuration:\n\n   ```bash\n   # AWS Configuration\n   AWS_REGION=us-east-1\n   AWS_PROFILE=default\n\n   # Translation Configuration\n   DEFAULT_TARGET_LANGUAGE=ko\n   BEDROCK_MODEL_ID=us.anthropic.claude-3-7-sonnet-20250219-v1:0\n\n   # Translation Settings\n   MAX_TOKENS=4000\n   TEMPERATURE=0.1\n   ENABLE_POLISHING=true\n   BATCH_SIZE=20\n   CONTEXT_THRESHOLD=5\n\n   # Font Settings by Language\n   FONT_KOREAN=\ub9d1\uc740 \uace0\ub515\n   FONT_JAPANESE=Yu Gothic UI\n   FONT_ENGLISH=Amazon Ember\n   FONT_CHINESE=Microsoft YaHei\n   FONT_DEFAULT=Arial\n\n   # Debug Settings\n   DEBUG=false\n\n   # Post-processing Settings\n   ENABLE_TEXT_AUTOFIT=true\n   TEXT_LENGTH_THRESHOLD=10\n   ```\n\n   **Note**: AWS credentials (Access Key ID and Secret Access Key) are not needed in the `.env` file if you have already configured them using `aws configure`. The service will automatically use your AWS CLI credentials.\n\n## Usage\n\n### Standalone Command-Line Usage\n\nThe PowerPoint Translator can be used directly from the command line:\n\n```bash\n# Translate entire presentation to Korean\nuv run python server.py --translate --input-file orig.pptx --target-language ko\n\n# Translate specific slides (individual slides)\nuv run python server.py --translate-slides \"1,3,5\" --input-file orig.pptx --target-language ko\n\n# Translate slide range\nuv run python server.py --translate-slides \"2-4\" --input-file orig.pptx --target-language ko\n\n# Translate mixed (individual + range)\nuv run python server.py --translate-slides \"1,3-5,8\" --input-file orig.pptx --target-language ko\n\n# Get slide information and previews\nuv run python server.py --slide-info --input-file orig.pptx\n\n# Using python directly\npython server.py --translate --input-file orig.pptx --target-language ko\npython server.py --translate-slides \"1,3\" --input-file orig.pptx --target-language ko\n```\n\n### FastMCP Server Mode (for AI Assistant Integration)\n\nStart the FastMCP server for integration with AI assistants like Amazon Q Developer:\n\n```bash\n# Using uv (recommended)\nuv run python server.py --mcp\n\n# Using python directly\npython server.py --mcp\n```\n\n## FastMCP Setup (Amazon Q Developer and Kiro)\n\nIf you haven't already installed Amazon Q Developer or Kiro, please refer to this:\n\n- Amazon Q Developer CLI: https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-installing.html\n- Kiro: https://kiro.dev\n\n### 2. Configure FastMCP Server\n\nCreate or update your Q Developer FastMCP configuration file:\n\n#### Kiro\n\n**User Level** `~/.kiro/settings/mcp.json`\n\n#### Amazon Q Developer\n\n**On macOS/Linux**: `~/.aws/amazonq/mcp.json`\n**On Windows**: `%APPDATA%\\amazonq\\mcp.json`\n\nAdd the PowerPoint Translator FastMCP server configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"ppt-translator\": {\n      \"command\": \"python\",\n      \"args\": [\"/path/to/ppt-translator/fastmcp_server.py\"],\n      \"env\": {\n        \"AWS_REGION\": \"us-east-1\",\n        \"AWS_PROFILE\": \"default\",\n        \"BEDROCK_MODEL_ID\": \"us.anthropic.claude-3-7-sonnet-20250219-v1:0\"\n      },\n      \"disabled\": false,\n      \"autoApprove\": [\n        \"translate_powerpoint\",\n        \"get_slide_info\",\n        \"get_slide_preview\",\n        \"translate_specific_slides\"\n      ]\n    }\n  }\n}\n```\n\n**Important**: Replace `/path/to/ppt-translator/` with the actual path to your cloned repository.\n\n### 3. Verify FastMCP Server\n\nTest that the FastMCP server is working:\n\n```bash\n# Navigate to your project directory\ncd /path/to/ppt-translator\n\n# Test the FastMCP server using uv\nuv run python server.py --mcp --test\n\n# Or test using python directly\npython server.py --mcp --test\n```\n\n### 4. Use PowerPoint Translation\n\nOnce connected, you can use commands like (User input does not have to be in English):\n\n```\nTranslate original.pptx to Korean\n```\n\n```\nPlease translate slides 10 to 13 of original.pptx into Japanese.\n```\n\n## Available FastMCP Tools\n\nThe FastMCP server provides the following tools:\n\n- **`translate_powerpoint`**: Translate an entire PowerPoint presentation\n\n  - Parameters:\n    - `input_file`: Path to the input PowerPoint file (.pptx)\n    - `target_language`: Target language code (default: 'ko')\n    - `output_file`: Path for the translated output file (optional, auto-generated)\n    - `model_id`: Amazon Bedrock model ID (default: Claude 3.7 Sonnet)\n    - `enable_polishing`: Enable natural language polishing (default: true)\n\n- **`translate_specific_slides`**: Translate only specific slides in a PowerPoint presentation\n\n  - Parameters:\n    - `input_file`: Path to the input PowerPoint file (.pptx)\n    - `slide_numbers`: Comma-separated slide numbers to translate (e.g., \"1,3,5\" or \"2-4,7\")\n    - `target_language`: Target language code (default: 'ko')\n    - `output_file`: Path for the translated output file (optional, auto-generated)\n    - `model_id`: Amazon Bedrock model ID (default: Claude 3.7 Sonnet)\n    - `enable_polishing`: Enable natural language polishing (default: true)\n\n- **`get_slide_info`**: Get information about slides in a PowerPoint presentation\n\n  - Parameters:\n    - `input_file`: Path to the PowerPoint file (.pptx)\n  - Returns: Overview with slide count and preview of each slide's content\n\n- **`get_slide_preview`**: Get detailed preview of a specific slide's content\n\n  - Parameters:\n    - `input_file`: Path to the PowerPoint file (.pptx)\n    - `slide_number`: Slide number to preview (1-based indexing)\n\n- **`list_supported_languages`**: List all supported target languages for translation\n\n- **`list_supported_models`**: List all supported Amazon Bedrock models\n\n- **`get_translation_help`**: Get help information about using the translator\n\n## Configuration\n\n### Environment Variables\n\n- `AWS_REGION`: AWS region for Bedrock service (default: us-east-1)\n- `AWS_PROFILE`: AWS profile to use (default: default)\n- `DEFAULT_TARGET_LANGUAGE`: Default target language for translation (default: ko)\n- `BEDROCK_MODEL_ID`: Bedrock model ID for translation (default: us.anthropic.claude-3-7-sonnet-20250219-v1:0)\n- `MAX_TOKENS`: Maximum tokens for translation requests (default: 4000)\n- `TEMPERATURE`: Temperature setting for AI model (default: 0.1)\n- `ENABLE_POLISHING`: Enable translation polishing (default: true)\n- `BATCH_SIZE`: Number of texts to process in a batch (default: 20)\n- `CONTEXT_THRESHOLD`: Number of texts to trigger context-aware translation (default: 5)\n- `DEBUG`: Enable debug logging (default: false)\n\n### Supported Languages\n\nThe service supports translation between major languages including:\n\n- English (en)\n- Korean (ko)\n- Japanese (ja)\n- Chinese Simplified (zh)\n- Chinese Traditional (zh-tw)\n- Spanish (es)\n- French (fr)\n- German (de)\n- Italian (it)\n- Portuguese (pt)\n- Russian (ru)\n- Arabic (ar)\n- Hindi (hi)\n- And many more...\n\n## Troubleshooting\n\n### Common Issues\n\n1. **AWS Credentials Not Found**:\n\n   - Ensure AWS credentials are properly configured\n   - Check AWS CLI configuration: `aws configure list`\n\n2. **Bedrock Access Denied**:\n\n   - Verify your AWS account has access to Bedrock\n   - Check if the specified model is available in your region\n\n3. **FastMCP Connection Issues**:\n\n   - Verify the path in mcp.json is correct\n   - Check that Python and dependencies are properly installed\n   - Review logs in Q Developer for error messages\n   - Test the server: `uv run python server.py --mcp --test`\n\n4. **PowerPoint File Issues**:\n\n   - Ensure the input file is a valid PowerPoint (.pptx) file\n   - Check file permissions for both input and output paths\n\n5. **Module Import Errors**:\n   - Use `uv run` to ensure proper virtual environment activation\n   - Install dependencies: `uv sync`\n\n## Development\n\n### Project Structure\n\n```\nppt-translator/\n\u251c\u2500\u2500 server.py              # Main server entry point (standalone & MCP)\n\u251c\u2500\u2500 fastmcp_server.py      # FastMCP server implementation\n\u251c\u2500\u2500 ppt_handler.py         # PowerPoint processing logic\n\u251c\u2500\u2500 translation_engine.py  # Translation service\n\u251c\u2500\u2500 bedrock_client.py      # Amazon Bedrock client\n\u251c\u2500\u2500 post_processing.py     # Post-processing utilities for translations\n\u251c\u2500\u2500 config.py             # Configuration management\n\u251c\u2500\u2500 dependencies.py       # Dependency management\n\u251c\u2500\u2500 text_utils.py         # Text processing utilities\n\u251c\u2500\u2500 prompts.py            # Translation prompts\n\u251c\u2500\u2500 requirements.txt      # Python dependencies\n\u251c\u2500\u2500 pyproject.toml        # Project configuration (uv)\n\u2514\u2500\u2500 imgs/                 # Example images and screenshots\n```\n\n### Using uv for Development\n\nThis project uses `uv` for dependency management:\n\n```bash\n# Install dependencies\nuv sync\n\n# Run the server\nuv run python server.py --mcp\n\n# Run tests\nuv run python server.py --mcp --test\n\n# Add new dependencies\nuv add package-name\n\n# Update dependencies\nuv sync --upgrade\n```\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2025 Daekeun Kim  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "AI-powered PowerPoint presentation translator using Amazon Bedrock",
    "version": "0.1.5",
    "project_urls": {
        "Changelog": "https://github.com/your-org/ppt-translator/blob/main/CHANGELOG.md",
        "Documentation": "https://github.com/your-org/ppt-translator#readme",
        "Homepage": "https://github.com/your-org/ppt-translator",
        "Issues": "https://github.com/your-org/ppt-translator/issues",
        "Repository": "https://github.com/your-org/ppt-translator.git"
    },
    "split_keywords": [
        "ai",
        " bedrock",
        " powerpoint",
        " ppt",
        " presentation",
        " translation"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2c5323b526e4b7ae25fd00c2efda300ef3501323c4318e3c146a355329b1c45c",
                "md5": "ecc5b7ffadf06223d6bfee0360a7d8c7",
                "sha256": "4575780dccbc28259eff394fc258897d504a4101d89c9d955955fcabe2217223"
            },
            "downloads": -1,
            "filename": "ppt_translator-0.1.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ecc5b7ffadf06223d6bfee0360a7d8c7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 39176,
            "upload_time": "2025-08-22T15:25:20",
            "upload_time_iso_8601": "2025-08-22T15:25:20.215678Z",
            "url": "https://files.pythonhosted.org/packages/2c/53/23b526e4b7ae25fd00c2efda300ef3501323c4318e3c146a355329b1c45c/ppt_translator-0.1.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e5ea25ae1a240ffa4d57ce3bf98e7a1f47048f1e1c7407cf980c6fe7fe4e88a9",
                "md5": "b11791686e5caf0773e2a567ce61d8e5",
                "sha256": "27aedd16530ade6c465293276c38fe61ddaf535fe0e43575d225050199f7e384"
            },
            "downloads": -1,
            "filename": "ppt_translator-0.1.5.tar.gz",
            "has_sig": false,
            "md5_digest": "b11791686e5caf0773e2a567ce61d8e5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 36597,
            "upload_time": "2025-08-22T15:25:21",
            "upload_time_iso_8601": "2025-08-22T15:25:21.503795Z",
            "url": "https://files.pythonhosted.org/packages/e5/ea/25ae1a240ffa4d57ce3bf98e7a1f47048f1e1c7407cf980c6fe7fe4e88a9/ppt_translator-0.1.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-22 15:25:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "your-org",
    "github_project": "ppt-translator",
    "github_not_found": true,
    "lcname": "ppt-translator"
}
        
Elapsed time: 1.12866s