Skip to content

apply-fix-issue-161#1702

Open
sshivampeta wants to merge 1 commit intomicrosoft:mainfrom
sshivampeta:fix/issue-161-description
Open

apply-fix-issue-161#1702
sshivampeta wants to merge 1 commit intomicrosoft:mainfrom
sshivampeta:fix/issue-161-description

Conversation

@sshivampeta
Copy link
Copy Markdown

I've implemented support for converting old .ppt files (Microsoft Office 97-2003 PowerPoint format) to Markdown, resolving Issue #161.

Changes Made:
Created _ppt_converter.py

New PptConverter class that detects .ppt files by extension and MIME type Converts .ppt → .pptx using LibreOffice command-line tool in headless mode Reuses the existing PptxConverter for markdown extraction Gracefully handles missing LibreOffice installation with clear error messages Supports all features: text, tables, images, notes Updated converters/init.py

Added PptConverter import and to all exports
Updated _markitdown.py

Imported PptConverter
Registered it in enable_builtins() method
How It Works:
Detects .ppt files by extension (.ppt) and MIME type (application/vnd.ms-powerpoint) Uses LibreOffice's headless conversion to transform .ppt → .pptx Leverages existing, well-tested PptxConverter for markdown extraction Includes proper error handling for missing LibreOffice and conversion failures Follows the same pattern as XlsConverter (for old .xls files) already in the codebase Requirements:
LibreOffice must be installed (available via libreoffice command) No new Python dependencies required
The implementation is production-ready and maintains consistency with the existing codebase patterns

I've successfully implemented support for converting old .ppt files (Microsoft Office 97-2003 PowerPoint format) to Markdown, resolving Issue microsoft#161.

Changes Made:
Created _ppt_converter.py

New PptConverter class that detects .ppt files by extension and MIME type
Converts .ppt → .pptx using LibreOffice command-line tool in headless mode
Reuses the existing PptxConverter for markdown extraction
Gracefully handles missing LibreOffice installation with clear error messages
Supports all features: text, tables, images, notes
Updated converters/init.py

Added PptConverter import and to __all__ exports
Updated _markitdown.py

Imported PptConverter
Registered it in enable_builtins() method
How It Works:
Detects .ppt files by extension (.ppt) and MIME type (application/vnd.ms-powerpoint)
Uses LibreOffice's headless conversion to transform .ppt → .pptx
Leverages existing, well-tested PptxConverter for markdown extraction
Includes proper error handling for missing LibreOffice and conversion failures
Follows the same pattern as XlsConverter (for old .xls files) already in the codebase
Requirements:
LibreOffice must be installed (available via libreoffice command)
No new Python dependencies required
The implementation is production-ready and maintains consistency with the existing codebase patterns
@sshivampeta
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant