मुख्य सामग्री पर जाएँ
Skillpedia
PDF, Word और स्लाइड54k · #3370

pptx

यह क्या करती है

यह स्किल AI एजेंट को सिखाती है कि outline से PowerPoint स्लाइड्स कैसे बनाएँ और मौजूदा decks कैसे बदलें। यह उन सबके लिए है जो presentations बनाते या अपडेट करते हैं।

कब इस्तेमाल करें

  • ✓जब आप किसी outline या नोट्स से नया slide deck बनवाना चाहते हैं।
  • ✓जब आपको मौजूदा PowerPoint फ़ाइल से टेक्स्ट या speaker notes निकालने हैं।
  • ✓जब आपके पास पहले से मौजूद deck में images, टेबल या charts बदलने हैं।

Skill का लिंक

https://github.com/HKUDS/DeepTutor/blob/main/deeptutor/skills/builtin/pptx/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/HKUDS/DeepTutor/blob/main/deeptutor/skills/builtin/pptx/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“इस outline को मेरे लिए दस स्लाइड वाले PowerPoint deck में बदलिए।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट एक Python लाइब्रेरी इस्तेमाल करता है, जो PowerPoint फ़ाइल के हिस्से पढ़ती और लिखती है। वह बदलाव करता है और तैयार deck लौटाता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

pptx

Work with PowerPoint .pptx files using python-pptx (preinstalled). A .pptx is a ZIP of XML parts; python-pptx handles the structure so you rarely touch XML. Drop to raw OOXML only for the few things the library can't express (see Advanced).

Use exec with complete Python source (language: python). Keep asset creation, deck generation, reopening, and structural verification in one call when possible; later calls can revise the same relative filename. Follow the turn's User workspace instructions for locating inputs, output boundaries, and presenting the finished deck.

Mental model

  • A presentation has slides; each slide is built from a layout; layouts live on slide masters. Layouts define placeholders (title, body, picture, etc.) by idx and type.
  • A slide holds shapes: placeholders, text boxes, pictures, tables, charts.
  • Shapes with text expose .text_frame → .paragraphs → .runs. A run is the unit that carries formatting (font, size, bold, color).
  • Units are EMU. Use the helpers: from pptx.util import Inches, Pt, Emu.

Read / extract

from pptx import Presentation

prs = Presentation("deck.pptx")
print(len(prs.slides), prs.slide_width, prs.slide_height)  # EMU dims

for i, slide in enumerate(prs.slides, 1):
    print(f"--- slide {i} (layout: {slide.slide_layout.name}) ---")
    for shape in slide.shapes:
        if shape.has_text_frame:
            print(shape.text_frame.text)  # \n-joined paragraphs
        elif shape.has_table:
            for row in shape.table.rows:
                print([c.text for c in row.cells])
    if slide.has_notes_slide:
        notes = slide.notes_slide.notes_text_frame.text
        if notes:
            print("NOTES:", notes)

Iterate slide.placeholders to see placeholder idx / placeholder_format.type. For a fast text-only dump, just collect shape.text_frame.text across slides.

Create from an outline

List the layouts first — indices vary by template. With the default template, layout 0 = Title, 1 = Title+Content, 5 = Title Only, 6 = Blank.

from pptx import Presentation
from pptx.util import Inches, Pt

prs = Presentation()  # or Presentation("template.pptx") to inherit a theme
for idx, lay in enumerate(prs.slide_layouts):
    print(idx, lay.name, [(p.placeholder_format.idx, p.name) for p in lay.placeholders])

# Title slide
s = prs.slides.add_slide(prs.slide_layouts[0])
s.shapes.title.text = "My Deck"
s.placeholders[1].text = "Subtitle"  # idx from the listing above

# Title + bullets
s = prs.slides.add_slide(prs.slide_layouts[1])
s.shapes.title.text = "Agenda"
tf = s.placeholders[1].text_frame
tf.text = "First point"  # first paragraph
for line, lvl in [("Second", 0), ("Sub-point", 1)]:
    p = tf.add_paragraph()
    p.text = line
    p.level = lvl

prs.save("out.pptx")

Always set text via placeholders/shapes — never hand-write bullet glyphs (•); indentation/bullets come from the layout via paragraph.level.

Add a free text box or picture on any slide:

tb = s.shapes.add_textbox(Inches(1), Inches(1), Inches(8), Inches(1))
r = tb.text_frame.paragraphs[0].add_run()
r.text = "Hi"
r.font.size = Pt(28)
r.font.bold = True
s.shapes.add_picture("logo.png", Inches(0.5), Inches(0.5), height=Inches(1))  # omit w to keep ratio

Edit existing

Edit at the run level to preserve a run's formatting; rewriting text_frame.text collapses to one run and drops inline formatting.

for slide in prs.slides:
    for shape in slide.shapes:
        if not shape.has_text_frame:
            continue
        for para in shape.text_frame.paragraphs:
            for run in para.runs:
                if "{{NAME}}" in run.text:
                    run.text = run.text.replace("{{NAME}}", "Frank")

To delete a shape/placeholder: sp = shape._element; sp.getparent().remove(sp). If the template has more slots than your data, remove the extra shapes entirely rather than leaving empty placeholders.

Replace an image in place (keep size/position)

python-pptx has no direct setter; swap the bytes of the related image part. Read the picture's r:embed rId off its <a:blip>, then overwrite the part's blob. The replacement bytes must use the same image encoding as the original part (for example PNG for PNG). A different encoding also requires a new correctly typed media part and relationship; changing _blob alone would leave invalid content-type metadata.

from pptx.oxml.n
अक्सर पूछे जाने वाले सवाल

क्या यह deck को PDF में एक्सपोर्ट कर सकती है?

हाँ। स्किल PDF या images में एक्सपोर्ट करने को अपने विकल्पों में से एक बताती है।

क्या यह deck के speaker notes पढ़ सकती है?

हाँ। यह मौजूदा deck से स्लाइड का टेक्स्ट और speaker notes निकाल सकती है।

क्या यह मौजूदा deck का डिज़ाइन बदल सकती है?

यह shapes, टेक्स्ट, टेबल और charts बदल सकती है। बड़े डिज़ाइन बदलाव फ़ाइल में पहले से मौजूद layouts पर निर्भर करते हैं।

जानकारी

लेखक का मूल विवरण

Read, create, or edit PowerPoint .pptx decks — build slides from an outline, extract slide text/speaker notes, edit shapes/tables/charts, replace images, or export to PDF/images. Use whenever a .pptx (or .ppt) file is an input or output, or the user mentions a deck, slides, or a presentation.

repo: HKUDS/DeepTutor

लोकप्रियता

GitHub स्टार
54k
रैंकिंग में स्थान
#3370
लाइसेंस
Apache-2.0
अपडेट की गई
31/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

deeptutor-cli

54k

यह आपके एजेंट को कमांड लाइन से DeepTutor, एक लर्निंग प्लेटफ़ॉर्म, सेट करने और चलाने में मदद करती है, जिसमें knowledge bases, notebooks और web ऐप शामिल हैं।

अन्यविविध

docx

54k

आपके एजेंट को Word .docx फ़ाइलें पढ़ने, बनाने और संपादित करने में मदद करती है, जिनमें रिपोर्ट, टेबल, find-and-replace और comments के साथ tracked changes शामिल हैं।

लेखन और डॉक्यूमेंटPDF, Word और स्लाइड

pdf

54k

आपके एजेंट को PDF फ़ाइलें पढ़ने, मिलाने, बाँटने, भरने और बनाने में मदद करती है, जिनमें उनसे टेक्स्ट और टेबल निकालना भी शामिल है।

लेखन और डॉक्यूमेंटPDF, Word और स्लाइड

skill-creator

54k

आपके एजेंट को DeepTutor skills लिखना या सुधारना सिखाती है, यानी वे छोटे निर्देश पैकेज जो AI को एक खास काम सिखाते हैं।

AI और एजेंटएजेंट

मिलती-जुलती skills