Run3 extract office text with pandoc
[COLM'26] SkillLearnBench is the first benchmark for evaluating continual learning methods that automatically generate agent skills.
npx -y skills add cxcscmu/SkillLearnBench --skill run3_extract_office_text_with_pandocAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
What its author says it does
Copied from the file, not written here
Extracts text from .docx and .pptx files using `pandoc`. This tool is preferred for its robustness in handling various document schemas and converting them into plain text for analysis.
SKILL.md
0.8 KB, as published. Nobody here has run it
import subprocess
import shutil
def extract_office_text(file_path):
"""
Extracts text from docx or pptx files using pandoc.
"""
if not shutil.which("pandoc"):
return None
try:
# Convert to plain text
result = subprocess.run(
["pandoc", "-f", "docx" if file_path.endswith(".docx") else "pptx", "-t", "plain", file_path],
capture_output=True,
text=True,
check=True
)
return result.stdout
except subprocess.CalledProcessError:
return None