Skip to content

About

Turn Office, OpenDocument, EPUB and XPS documents into directories of readable XML, and back again.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

exploderino

CI PyPI Python versions License: Apache-2.0

Word, Excel, PowerPoint, Visio, OpenDocument, EPUB and XPS files are ZIP archives of XML underneath. Unzipping one is easy; getting back a document that still opens after you edit it is not. exploderino unpacks a document into an ordinary directory, indents the XML only where that can't change the text, keeps signed parts byte for byte, and records everything needed to rebuild the archive: part order, compression and timestamps.

Edit the parts with any tool you like, such as grep, sed, git diff, XSLT, a script or an AI agent, and exploderino packs them back into a valid document. exploderino verify checks, before you rely on it, that an unedited round trip gives back every part's content unchanged. exploderino isn't a document editor: it doesn't update the cross-references between parts, so keeping them consistent after structural edits is up to you (see limitations).

deck.pptx  ──explode──▶  deck.pptx.exploded/
                            ├── .exploderino.json        manifest used to rebuild
                            ├── [Content_Types].xml
                            ├── _rels/.rels
                            ├── docProps/{app,core}.xml
                            └── ppt/
                                ├── presentation.xml
                                ├── slides/slide1.xml …
                                ├── slideLayouts/ slideMasters/ theme/
                                └── media/image1.png …
           ◀──implode──

Why not just unzip?

unzip and xmllint --format give you readable XML. Getting a working document back is the hard part:

  • Reformatting can change the text. In OpenDocument paragraphs and EPUB chapters, whitespace between elements is visible text, so a general-purpose pretty-printer adds or removes spaces in the document. exploderino indents only where whitespace is formatting, and checks that each part comes back identical before it indents it.
  • zip -r builds archives that applications reject. OpenDocument and EPUB need mimetype stored first and uncompressed. exploderino records each part's order, compression and timestamp, and rebuilds the archive from them.
  • Signatures break. Re-serializing a signed document's XML invalidates the signature. exploderino keeps signed parts byte for byte, so an unedited round trip stays valid.
  • Documents from elsewhere can be hostile. exploderino rejects path traversal, decompression bombs and XML entity attacks, and never runs macros.

Features

  • Readable parts: XML is indented for reading, diffing and editing; images, fonts and other binary parts are copied as they are.
  • Exact round trips: unedited documents come back with every part's content unchanged, including part order, compression and timestamps.
  • Many formats: Office Open XML, OpenDocument, EPUB and XPS, detected from file content. Legacy .doc, .xls and .ppt files can be inspected read-only.
  • Embedded documents: a workbook inside a document can be exploded in place, and is rebuilt automatically.
  • Safe with untrusted files: protection against path traversal, decompression bombs and XML attacks; encrypted and signed content is detected and preserved.
  • Several ways to run: a command-line tool, a typed Python API, a Docker image and a Makefile, with JSON output for scripts.

Installation

exploderino needs Python 3.9 or newer (tested on 3.9 to 3.15) on macOS or Linux. Windows isn't tested. The only required dependency, lxml, is installed automatically.

# A standalone exploderino command, with legacy .doc/.xls/.ppt support (recommended)
uv tool install 'exploderino[ole]'     # or: pipx install 'exploderino[ole]'

# Or into the current Python environment
pip install 'exploderino[ole]'

Leave out [ole] if you don't need legacy files; it adds the olefile package. After pip install, python -m exploderino works too. To upgrade, run uv tool upgrade exploderino, pipx upgrade exploderino or pip install -U exploderino; to uninstall, uv tool uninstall exploderino, pipx uninstall exploderino or pip uninstall exploderino.

To try the latest unreleased code, install from GitHub:

uv tool install 'exploderino[ole] @ git+https://github.com/ChickenWorks/exploderino'

Docker

Each release is published as a multi-platform image (linux/amd64 and linux/arm64) with the [ole] extra. It runs as a non-root user in /work, so mount the directory that holds your documents there; paths are then relative to it.

docker run --rm -u "$(id -u):$(id -g)" -v "$PWD:/work" ghcr.io/chickenworks/exploderino deck.pptx
docker run --rm -u "$(id -u):$(id -g)" -v "$PWD:/work" ghcr.io/chickenworks/exploderino deck.pptx.exploded -o deck-edited.pptx

-u "$(id -u):$(id -g)" makes the files the container writes belong to you. Tags are X.Y.Z, X.Y and latest. To build the image yourself, run docker build -t exploderino . in a checkout, or use the Makefile, which also saves typing these options.

From source

git clone https://github.com/ChickenWorks/exploderino.git
cd exploderino
uv tool install '.[ole]'          # a standalone command
uv run exploderino --help         # or run it from the checkout without installing

This needs uv. CONTRIBUTING.md covers setting up for development.

Quick start

Point it at a document to explode it, or at an exploded directory to implode it. It works out which from the path, and detects the document's format from its content, not its extension.

exploderino deck.pptx                              # explode -> deck.pptx.exploded/
grep -o '<a:t>[^<]*</a:t>' deck.pptx.exploded/ppt/slides/slide1.xml   # inspect or edit
exploderino deck.pptx.exploded -o deck-edited.pptx # implode into a new file
exploderino verify deck.pptx                       # optional: check the round trip

Implode never overwrites a file unless you pass --force, and the default output name is usually the original document, so use -o to write a new file. The user guide has recipes for extracting text, finding and replacing, swapping images and tracking documents in git.

Supported formats

Family Extensions Explode Implode
Word, Excel, PowerPoint, Visio .docx .xlsx .pptx .vsdx and their macro-enabled, template, add-in and other variants, plus .xlsb Yes Yes
OpenDocument .odt .ods .odp .odg and the other ODF types, including LibreOffice Base .odb Yes Yes
EPUB .epub (EPUB 2 and 3) Yes Yes
XPS .xps .oxps Yes Yes
Legacy Office (OLE) .doc .xls .ppt, Visio, Publisher, Project and Outlook files Read-only, with [ole] No

Formats lists every extension, which parts are pretty-printed, and how password protection, DRM and digital signatures are handled.

Documentation

Project status

exploderino is stable and follows Semantic Versioning. Its public interface is the command line, the JSON output, the Python API and the manifest format: patch releases fix bugs, minor releases add features without breaking that interface, and only a new major version changes it incompatibly. The changelog lists every change.

Contributing

Bug reports, feature requests and pull requests are welcome. CONTRIBUTING.md explains how to set up a checkout, the checks a change must pass and the pull request process. Everyone taking part is expected to follow the Code of Conduct.

Security

Please report security problems privately, as described in SECURITY.md, not in a public issue.

License

exploderino is licensed under the Apache License 2.0. Copyright 2026 Chicken Works.

About

Turn Office, OpenDocument, EPUB and XPS documents into directories of readable XML, and back again.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages