#!/usr/bin/env python3 """Create test Office files for testing office-file-handler skill""" import pandas as pd from openpyxl import Workbook from docx import Document from pptx import Presentation import os # Create test Excel file print("Creating test Excel file...") df = pd.DataFrame({ 'Repository': ['openclaw/openclaw', 'github/copilot', 'nodejs/node'], 'URL': ['https://github.com/openclaw/openclaw', 'https://github.com/github/copilot', 'https://github.com/nodejs/node'], 'Stars': [1000, 5000, 90000], 'Language': ['TypeScript', 'JavaScript', 'JavaScript'] }) df.to_excel('test.xlsx', index=False) print(f"✓ Created test.xlsx") # Create test Word document print("\nCreating test Word document...") doc = Document() doc.add_heading('Test Document', 0) doc.add_paragraph('This is a test paragraph for the office-file-handler skill.') doc.add_paragraph('The skill supports reading Word documents and extracting text.') doc.add_heading('Features', level=1) doc.add_paragraph('• Read documents', style='List Bullet') doc.add_paragraph('• Extract text', style='List Bullet') doc.add_paragraph('• Export to various formats', style='List Bullet') doc.save('test.docx') print(f"✓ Created test.docx") # Create test PowerPoint presentation print("\nCreating test PowerPoint presentation...") prs = Presentation() slide = prs.slides.add_slide(prs.slide_layouts[0]) title = slide.shapes.title subtitle = slide.placeholders[1] title.text = "Test Presentation" subtitle.text = "Generated for testing office-file-handler skill" slide2 = prs.slides.add_slide(prs.slide_layouts[1]) shapes = slide2.shapes title_shape = shapes.title body_shape = shapes.placeholders[1] title_shape.text = "Test Slide 2" tf = body_shape.text_frame tf.text = "This is a test slide with some text." p = tf.add_paragraph() p.text = "The skill supports reading PowerPoint presentations." pr = tf.add_paragraph() pr.text = "It can extract slide content and titles." prs.save('test.pptx') print(f"✓ Created test.pptx") print("\n✓ All test files created successfully!") print("Files: test.xlsx, test.docx, test.pptx")