odtlisted
Install: claude install-skill leiverkus/open-document-skills
# ODT creation, editing, and analysis
## Overview
An `.odt` file is an OpenDocument ZIP package. Important package files:
- `mimetype` - should be the first ZIP entry and stored uncompressed as `application/vnd.oasis.opendocument.text`
- `content.xml` - document body
- `styles.xml` - named styles and page layout
- `meta.xml` - document metadata
- `settings.xml` - application settings
- `META-INF/manifest.xml` - package manifest
## Quick Reference
| Task | Preferred approach |
|------|--------------------|
| Extract text and structure | Use `scripts/extract_text.py` or parse `content.xml` |
| Create styled/template document | Start from an `.odt` template, preserve styles/page layout, edit XML |
| Create simple structured document | Generate ODT package XML directly |
| Convert Markdown/HTML/DOCX to ODT | Use Pandoc/LibreOffice only when the source already exists or interoperability requires it |
| Preserve complex formatting | Unpack the ODT, edit XML with a structured XML parser, then repack carefully |
| Inspect raw structure | `unzip -l file.odt`; `python -m zipfile -e file.odt unpacked/` |
## Tool Checks
Before starting a real ODT task, check which tools are available:
```bash
which pandoc
python3 -c "import odf; print('odfpy available')"
```
Resolve the LibreOffice command as described in [docs/soffice-resolver.md](../../docs/soffice-resolver.md).
## Reading Content
For plain text and semantic structure:
```bash
pandoc input.odt -t markdown -o output.md
```