---
name: odp
displayName: ODP (OpenDocument Presentation) Reader & Converter
description: Read, extract text, and convert .odp OpenDocument Presentation
  files to JSON or plain text. Use when a user shares or references a .odp file.
tags:
  - document
  - presentation
  - odp
  - opendocument
  - libreoffice
  - convert
  - extract
capabilities:
  - ReadOdp
  - ExtractSlideText
  - ExtractSpeakerNotes
  - ConvertToJson
  - ConvertToText
representativeQueries:
  - Read a .odp file and show me the content
  - Convert an ODP presentation to JSON
  - Extract all slide text from an OpenDocument presentation
  - What is in this .odp file?
  - Pull the speaker notes out of an ODP file
version: 0.1.0
tier: curated
---

# ODP (OpenDocument Presentation) Reader & Converter

Reads `.odp` files (OpenDocument Presentation format, used by LibreOffice Impress and exported by Google Slides) and extracts per-slide text and speaker notes as structured JSON or plain text. No external libraries required — uses only Python stdlib.

## When to use

Use this skill whenever a user shares, uploads, or references a `.odp` file and wants to read its content, extract specific slides, or convert the presentation to a text-friendly format for downstream processing.

## Steps

1. **Detect format.** Confirm the file is a valid ZIP archive containing `content.xml` (the script validates both; extension is a convention but not enforced).
2. **Route by task.** For text extraction, run `scripts/odp_converter.py <path>`. For JSON output, pass `--format json`. For plain text, pass `--format text` (default).
3. **Use bundled script.** The script opens the ZIP, parses `content.xml` with `xml.etree.ElementTree`, walks `draw:page` elements, and collects slide title, body text, and speaker notes per slide.
4. **Surface output.** Present the extracted content to the user — or pipe JSON into further processing steps.

## Operations

| Capability | CRUD | Resource | Tool |
|---|---|---|---|
| `ReadOdp` | READ | .odp file (ZIP+XML) | `scripts/odp_converter.py` |
| `ExtractSlideText` | READ | slide body text | `scripts/odp_converter.py` |
| `ExtractSpeakerNotes` | READ | presentation:notes elements | `scripts/odp_converter.py` |
| `ConvertToJson` | READ | structured slide data | `scripts/odp_converter.py --format json` |
| `ConvertToText` | READ | flat plain-text dump | `scripts/odp_converter.py --format text` |

## Output

- **JSON mode (`--format json`):** A JSON array, one object per slide: `{"slide": 1, "title": "...", "body": ["..."], "notes": "..."}`.
- **Text mode (`--format text`, default):** Human-readable dump with `=== Slide N ===` headers, body lines, and a `[Notes]` section when present.

## Context

- `.odp` is a ZIP containing `content.xml` (slide data), `styles.xml`, `meta.xml`, and optional media. Only `content.xml` is needed for text extraction.
- Namespace URIs: `draw:` = `urn:oasis:names:tc:opendocument:xmlns:drawing:1.0`; `text:` = `urn:oasis:names:tc:opendocument:xmlns:text:1.0`; `presentation:` = `urn:oasis:names:tc:opendocument:xmlns:presentation:1.0`.
- ElementTree in Python uses Clark notation `{uri}localname` — the script handles this transparently.
- Speaker notes are a child `presentation:notes` element of each `draw:page`; they may be absent if the author left them blank.

## Notes

- Binary objects (images, embedded OLE) inside the ZIP are ignored — only XML text is extracted.
- Very large presentations (100+ slides) are iterated slide-by-slide after parsing, but `ET.parse()` loads the entire `content.xml` into memory first; extremely large files may have a non-trivial memory footprint.
- Files produced by Google Slides "Download as ODP" follow the same structure and work without special handling.
- For PPTX (PowerPoint) files, use the `pptx` skill instead.

<!-- runner-fallback -->
## Remote runner (MCP)
Can't run this locally (no setup, missing dependency)? The StealthStack runner exposes the **same code** as server-side MCP tools — no local install needed: `odp_to_text`, `odp_to_json`. Call the `application/mcp` catalog twin of this skill (its `runnerTwin`).
