OTP to TXT
Your presentation never leaves your browser, and nothing is downloaded to make this work. An OpenDocument file is a ZIP of XML and your browser can already unzip; the rest is reading.
The words off the slides, in the order they are on them.
This is the common need behind “convert my presentation”: somebody wants the script, not the deck. Each slide keeps its heading and its bullets, indented to the level they were nested at, and the speaker notes are kept apart so you can take them or leave them. That last part is the whole job: notes live inside the slide in the file, and a converter that walks the text hands you the presenter's private remarks as though they were on the screen.
The speaker notes are inside the slide
This is the one thing about the format that catches every
converter written in an afternoon. A presentation's notes are not a
separate file or a separate section: presentation:notes is a
child of the slide, holding frames and paragraphs shaped exactly
like the slide's own.
So the obvious reader — unzip, find every
text:p, take the text — hands you back every slide with
the presenter's private remarks glued onto the end of it. Nothing errors.
Nothing looks wrong. The notes simply become part of the talk, and the
first anybody knows is when they read it.
Here they are read separately, counted, and left out unless you ask for them. The count is on screen either way, because “this deck had eleven paragraphs of notes and you have not got them” is worth knowing.
And a run of spaces is not spaces
OpenDocument does not store repeated spaces as
characters. Two or more become one
<text:s text:c="6"/> element, a tab becomes
<text:tab/> and a line break inside a paragraph becomes
<text:line-break/>. Take only the character data and
“Q1 Q2” comes out as
“Q1Q2” — a silent corruption that reads like a typo in
the original. All three are expanded here, and tested against a file
odfpy wrote.
A template is the presentation, with a different label
An .otp and an .odp are the
same file. Same ZIP, same content.xml, same
draw:page elements. One string differs, in the
mimetype entry at the front of the package:
…opendocument.presentation-template where a plain deck
says …opendocument.presentation. That is the whole of
it, and this page exists because the file on your disk says
.otp and you should not have to know that it makes no
difference.
What does not come across
The layout. A slide is boxes at coordinates; this is a document that reads top to bottom, so two columns become one after the other. Backgrounds, master-slide furniture, transitions and animations have nowhere to go. Pictures, charts and embedded objects are counted and named but not carried, because they are separate files inside the package.
Page numbers, dates and footers are dropped on purpose: they are marked as furniture in the file, and repeating “Slide 4 of 20” through a transcript helps nobody.
Where to go next
- OTP to Markdown — the same file, another way out
- OTP to HTML — the same file, another way out
- ODP to TXT — the template, which is the same format