feat: add support for generating pptx files via PptxGenJS (Issue #915)#942
feat: add support for generating pptx files via PptxGenJS (Issue #915)#942aviralgarg05 wants to merge 4 commits into
Conversation
|
Thanks @aviralgarg05 for the PR! We wonder if it is possible to move the PPTXGenjs support to the CAMEL repo: https://github.com/camel-ai/camel. Some other agent builders can also use it early for their applications 🙏 |
I have created it there |
|
thanks for the contribution! could @bytecraftii @fengju0213 help reviewing this? |
bytecii
left a comment
There was a problem hiding this comment.
Left some comments. And can we also add a unit test for this?
bytecii
left a comment
There was a problem hiding this comment.
Can we also include a snapshot of created slide in the description for future reference and a more detailed description? Thanks.
I'll update the PR description with more technical implementation details. I'll also generate a sample PPTX and attach a snapshot of the slides to the description for better reference. |
4pmtong
left a comment
There was a problem hiding this comment.
Thanks @aviralgarg05 for contribution!
Description
This pull request implements support for generating PowerPoint (.pptx) documents using the PptxGenJS library, addressing the requirements outlined in issue #915.
Since PptxGenJS is a JavaScript-based library and the core document agent operates in a Python environment, this PR introduces a hybrid integration:
pptxgenjslibrary. It handles the creation of slides, including titles, headings, bullet points, and tables from a structured JSON payload.pptxgenjsto the root package.json.Technical Implementation Details:
pptx_toolkit.pyto usepathlib.Pathand a_get_project_root()helper, ensuring the Node.js bridge is located correctly across different environments.THEMEconfiguration object ingenerate_pptx.jsto manage colors, font sizes, and layout in one place, making it easier to customize the look and feel of generated presentations.backend/test/utils/toolkit/test_pptx_toolkit.pyto verify path resolution, subprocess execution, and JSON serialization logic.This allows the Document Agent to create high-quality, professional PowerPoint presentations while maintaining compatibility with the existing Python orchestration layer.
What is the purpose of this pull request?
Visual Reference