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

pptx-shell-verify

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

यह स्किल बताती है कि जब अंतर्निहित टूल विफल हों, तब python-pptx से .pptx प्रेज़ेंटेशन का निरीक्षण कैसे करें। यह उन लोगों के लिए है जिन्हें डेक में क्या है, इसकी संरचित रिपोर्ट चाहिए।

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

  • ✓जब read_file या दूसरे टूल PowerPoint फ़ाइल नहीं पढ़ सकते।
  • ✓जब मुझे प्रेज़ेंटेशन का ढाँचा और सामग्री पक्की करनी हो।
  • ✓जब वातावरण में Python है, पर लाइब्रेरी पहले इंस्टॉल करनी पड़ सकती है।

Skill का लिंक

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/pptx-shell-verify/SKILL.md

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

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

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

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

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

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

“कृपया मेरी प्रेज़ेंटेशन की सामग्री जाँचिए, जिसमें स्लाइड संख्या और शीर्षक शामिल हों। अगर लाइब्रेरी गायब हो, तो पहले उसे इंस्टॉल कीजिए।”

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

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

AI सामान्य रीड आज़माता है, जाँचता है कि python-pptx उपलब्ध है या नहीं और न होने पर इंस्टॉल करता है, फिर एक सत्यापन स्क्रिप्ट चलाता है जो स्लाइड संख्या और हर स्लाइड का विवरण JSON में छापती है।

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

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

PowerPoint Shell Verification

When to Use This Skill

Use this skill when:

  • read_file or other built-in tools fail to read PowerPoint (.pptx) files
  • You need to verify presentation structure (slide count, titles, content)
  • Standard file inspection methods return errors or incomplete data

Prerequisites

  • Python 3.x installed in the execution environment
  • python-pptx library available (install if needed)

Step-by-Step Instructions

Step 1: Attempt Standard File Read

First, try to read the file using standard methods:

read_file: path/to/presentation.pptx

If this fails or returns unusable data, proceed to Step 2.

Step 2: Verify python-pptx Availability

Check if the library is installed:

run_shell: python -c "import pptx; print('pptx available')"

If not available, install it:

run_shell: pip install python-pptx

Step 3: Create Verification Script

Create a Python script to extract presentation metadata:

# verify_pptx.py
from pptx import Presentation
import sys
import json

def verify_presentation(filepath):
    try:
        prs = Presentation(filepath)
        data = {
            "slide_count": len(prs.slides),
            "slides": []
        }
        
        for i, slide in enumerate(prs.slides):
            slide_data = {
                "slide_number": i + 1,
                "title": None,
                "shapes_count": len(slide.shapes)
            }
            
            # Extract title if present
            if slide.shapes.title:
                slide_data["title"] = slide.shapes.title.text
            
            data["slides"].append(slide_data)
        
        print(json.dumps(data, indent=2))
        return True
    except Exception as e:
        print(f"ERROR: {str(e)}", file=sys.stderr)
        return False

if __name__ == "__main__":
    if len(sys.argv) < 2:
        print("Usage: python verify_pptx.py <file.pptx>", file=sys.stderr)
        sys.exit(1)
    
    success = verify_presentation(sys.argv[1])
    sys.exit(0 if success else 1)

Step 4: Execute Verification

Run the verification script:

run_shell: python verify_pptx.py path/to/presentation.pptx

Step 5: Interpret Results

Expected output format:

{
  "slide_count": 10,
  "slides": [
    {
      "slide_number": 1,
      "title": "Introduction",
      "shapes_count": 3
    },
    ...
  ]
}

Use this data to:

  • Confirm expected slide count matches
  • Verify slide titles are present
  • Validate presentation structure before delivery

Example Validation Checks

# Check slide count matches requirement
assert data["slide_count"] >= expected_min_slides

# Check all slides have titles
for slide in data["slides"]:
    assert slide["title"] is not None, f"Slide {slide['slide_number']} missing title"

Troubleshooting

Issue Solution
Corrupted file Verify file was created successfully, check file size
Permission denied Ensure file path is accessible, check read permissions
Library not found Install with pip install python-pptx
Empty presentation File may be 0 bytes or incomplete write

Best Practices

  1. Always verify after creation: Run verification immediately after generating a PowerPoint file
  2. Keep verification script reusable: Store the script for future presentations
  3. Validate before delivery: Never deliver a presentation without confirming structure
  4. Log verification results: Keep verification output for audit trails
अक्सर पूछे जाने वाले सवाल

आउटपुट का फ़ॉर्मैट क्या है?

उदाहरण स्लाइड डेटा को JSON के रूप में छापता है।

पहले क्या जाँचा जाता है?

गाइड python-pptx इस्तेमाल करने से पहले सामान्य फ़ाइल रीड आज़माती है।

स्क्रिप्ट क्या इकट्ठा करती है?

हर स्लाइड का विवरण, जैसे उसका क्रम नंबर और शीर्षक, साथ में कुल स्लाइड संख्या।

जानकारी

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

Verify PowerPoint presentation contents using python-pptx via shell when standard file readers fail

repo: HKUDS/AgentPilot

लोकप्रियता

GitHub स्टार
7.8k
रैंकिंग में स्थान
#12949
लाइसेंस
MIT
अपडेट की गई
1/11/2026

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

0

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

कमेंट

  • …

इस repository की और skills

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