Untitled
unknown
plain_text
a month ago
2.6 kB
3
Indexable
# Create a presentation object presentation = Presentation() # Slide 1: Title Slide slide_1 = presentation.slides.add_slide(presentation.slide_layouts[0]) title = slide_1.shapes.title subtitle = slide_1.placeholders[1] title.text = "Presentation Title" subtitle.text = "Subtitle\nYour Name\nDate" # Slide 2: Agenda Slide slide_2 = presentation.slides.add_slide(presentation.slide_layouts[1]) title = slide_2.shapes.title body = slide_2.shapes.placeholders[1] title.text = "Agenda" text_frame = body.text_frame text_frame.text = "• Key Point 1" p = text_frame.add_paragraph() p.text = "• Key Point 2" p = text_frame.add_paragraph() p.text = "• Data Insights" p = text_frame.add_paragraph() p.text = "• Conclusion" # Slide 3: Key Point 1 slide_3 = presentation.slides.add_slide(presentation.slide_layouts[1]) title = slide_3.shapes.title body = slide_3.shapes.placeholders[1] title.text = "Key Point 1" text_frame = body.text_frame text_frame.text = "• Key idea 1" p = text_frame.add_paragraph() p.text = "• Supporting point 1" p = text_frame.add_paragraph() p.text = "• Supporting point 2" # Slide 4: Key Point 2 slide_4 = presentation.slides.add_slide(presentation.slide_layouts[1]) title = slide_4.shapes.title body = slide_4.shapes.placeholders[1] title.text = "Key Point 2" text_frame = body.text_frame text_frame.text = "• Key idea 2" p = text_frame.add_paragraph() p.text = "• Supporting point 1" p = text_frame.add_paragraph() p.text = "• Supporting point 2" # Slide 5: Data Insights slide_5 = presentation.slides.add_slide(presentation.slide_layouts[1]) title = slide_5.shapes.title body = slide_5.shapes.placeholders[1] title.text = "Data Insights" text_frame = body.text_frame text_frame.text = "• Insight 1 from data" p = text_frame.add_paragraph() p.text = "• Insight 2 from data" # Slide 6: Conclusion slide_6 = presentation.slides.add_slide(presentation.slide_layouts[1]) title = slide_6.shapes.title body = slide_6.shapes.placeholders[1] title.text = "Conclusion" text_frame = body.text_frame text_frame.text = "• Summary Point 1" p = text_frame.add_paragraph() p.text = "• Summary Point 2" p = text_frame.add_paragraph() p.text = "• Final Thought" # Slide 7: Q&A slide_7 = presentation.slides.add_slide(presentation.slide_layouts[1]) title = slide_7.shapes.title subtitle = slide_7.placeholders[1] title.text = "Questions?" subtitle.text = "Thank you!\nYour Contact Info" # Save the presentation to a file file_path = '/mnt/data/professional_presentation_sample.pptx' presentation.save(file_path)
Editor is loading...
Leave a Comment