Skillpedia
PDF وWord والعروض التقديمية7.8k · #12948

pptx-file-validation

ما الذي تفعله

يفحص هذه المهارة محتويات ملف .pptx بقراءة شرائحه بمكتبة python-pptx. وهي مناسبة لمن يحتاج إلى التأكد من أن العرض يحتوي على الشرائح الصحيحة قبل استخدامه.

متى تستخدمها

  • ✓عندما تفشل أداة القراءة في فتح ملف PowerPoint.
  • ✓عندما أحتاج إلى معرفة عدد شرائح العرض وعناوينها.
  • ✓عندما أريد التأكد من أن بنية العرض مكتملة.

رابط المهارة

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

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/pptx-file-validation/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“أداة القراءة لا تفتح هذا العرض التقديمي. من فضلك تحقق كم شريحة فيه واعرض عنوان كل شريحة.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يشغّل الذكاء الاصطناعي أمر Python قصيرًا من الطرفية يحمّل العرض، ويعد الشرائح، ويطبع عنوان كل شريحة، ثم يبلغ بأي عناصر ناقصة.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

PPTX File Validation Workflow

This skill provides a reliable method to validate PowerPoint (.pptx) files when the built-in read_file function fails or returns insufficient information.

When to Use

  • read_file fails to read a .pptx file
  • You need to verify presentation contents (slide count, titles, structure)
  • Standard file readers return incomplete or unreadable data

Step-by-Step Instructions

Step 1: Detect read_file Failure

Attempt to read the PowerPoint file using read_file. If it fails, returns garbled content, or doesn't provide the structural information you need, proceed to Step 2.

Step 2: Use run_shell with python-pptx

Execute a Python script using run_shell with the python-pptx library to inspect the presentation:

python3 -c "
from pptx import Presentation
prs = Presentation('path/to/file.pptx')
print(f'Total slides: {len(prs.slides)}')
for i, slide in enumerate(prs.slides, 1):
    print(f'Slide {i}: {slide.shapes.title.text if slide.shapes.title else \"[No Title]\"}')
"

Step 3: Parse and Validate Output

Analyze the output to verify:

  • Slide count matches expected number
  • Slide titles align with required topics
  • Structure is complete and properly formatted

Step 4: Report Validation Results

Document the validation findings, including:

  • Total number of slides
  • List of slide titles
  • Any missing or problematic content

Example Usage

# In your agent workflow
run_shell(command="python3 -c \"from pptx import Presentation; prs = Presentation('output.pptx'); print(f'Slides: {len(prs.slides)}'); [print(f'{i}: {s.shapes.title.text}') for i, s in enumerate(prs.slides, 1) if s.shapes.title]\"")

Prerequisites

Ensure python-pptx is available in the environment:

pip install python-pptx

Benefits

  • Reliable: Works when built-in readers fail
  • Detailed: Provides slide-by-slide breakdown
  • Programmatic: Easy to parse and validate against requirements
  • Lightweight: No need for PowerPoint software installation
الأسئلة الشائعة

ماذا يبلغ الفحص؟

عدد الشرائح الإجمالي وعنوان كل شريحة.

كيف تُعرض الشرائح التي لا عنوان لها؟

يطبع المثال عبارة مثل No Title للشرائح التي لا عنوان لها.

هل الفحص للقراءة فقط؟

نعم، يقرأ المثال العرض ولا يغيّره.

التفاصيل

الوصف الأصلي من المؤلف

Validate PowerPoint files using python-pptx when standard file readers fail

repo: HKUDS/AgentPilot

الشعبية

نجوم GitHub
7.8k
الترتيب
#12948
الترخيص
MIT
آخر تحديث
1‏/11‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة