I’ve just released a first beta of Hovercraft!, a tool to generate Prezi-style presentations from reStructuredText. This may need some explanation, but there is a TL;DR version as well.
The basic problem here is that the typical GUI tool for making presentations, from Impress to Prezi, don’t fit the way I make presentations. I do a lot of reorganizing and moving around, and that might mean changing things from bullet lists to headings to text to pictures and back to bullet lists over again. The GUI is only in the way. Some GUI tools have outline modes which are half-way usable, but in the end I want to write my presentations as text, so I can move things around.
And writing them in text and then making slides doesn’t work, since I often realize that I need to change things around once I get to the “making slides” part. So I need to have text as a “source” and “compile” presentations from that text. So, enter reStructuredText.
reStructuredText
reStructuredText, reST or RST, is a so called “lightweight” markup language. Although there is nothing lightweight about it, it is in fact massive and have an incredible amount of features, which is one reason it’s popular. It’s used a lot within the Python community, and is often used to write everything from readme files to books. There are other languages that have their benefits, most notably Markdown and textile, but I don’t know if any of them have the feature set required for Hovercraft, and I’m used to reStructuredText.
There are several ways to make slides from reStructuredText. One is included in the docutils library that implements reStructuredText, adn it can generate S5 slides. Another is Landslide, which i have used as it has a presenter console. But these generate standard left-to-right slide presentations in HTML. Nothing wrong with that, but it’s a bit boring. Enter impress.js.
impress.js
impress.js is a tool to make HTML presentations that zoom and rotate. It’s cool and I used that to make a zooming/panning version of my talk on intellectual properties. And then I made a presentation about Calendaring for PyCon PL 2012 and PloneConf 2012. And by that time I was seriously tired of it, because you write your presentations in HTML, and that sucks in itself, and then you have to position each slide separately. That worked fine in the first case, where I had this huge image to zoom around it. But for the Calendaring talk I ended up having to reposition a lot of slides each time I needed to insert or delete a slide. Not a practical solution. I needed to somehow be able to write reStrcuturedText and get impress.js out. After a false start with a template for Landslide, I hit on the solution: Use docutils to generate XML from reStructuredText and the use XSLT to transform it into an impress.js presentation. That worked, and the solution is Hovercraft!
Positioning
But impress.js is no fun if you have to position each slide separately and you have to reposition all the slides when you insert or delete slides. So for that reason there are several ways in Hovercraft! to position slides:
- Absolute positioning: You simply add X and Y coordinates to a slide, in pixels. Doing only this will not be fun, but someone might need it.
- Relative positioning: By specifying x and/or y with with a starting r, you specify the distance from the previous slide. By using this form of positioning you can insert a slide, and the other slides will just move to the side.
- Automatically: If you don’t specify any position the slide will end up the same distance from the previous slide as the previous slide was from it’s previous slide. This defaults to moving 1600px to the right, which means that if you supply no positions at all anywhere in the presentation, you get the standard boring slide-to-the-left presentation.
- With an SVG path: In this last way of positioning, you can steal an SVG path from an SVG document and stick it in the presentation, and that slide + all slides following that has no explicit positioning, will be positioned on that path. This can be a bit fiddly to use, but can create awesome results, such as positioning the slides as snaking Python or similar.
All in all, the idea here is that you should be able to do the zoom and rotate coolness with as little effort as possible. There may be big changes in how the positioning works in the early versions, to make it more practical. There may also be new ways of positioning. Unknown to me, Gael Pasgrimaud has the same problems as me, and made a tool also called Impress based on Sphinx and impress.js, with the same aim as me (although wildly different implementations). It has one cool feature: you can write functions in Python that does the positioning for you. That could be a cool addition for the future, for example.
impressConsole.js
impress.js also badly needed a presenter console. I took a simple one that David Souther had made, called notes.js, and rewrote it into impressConsole.js. It will show the current slide, the next slide, your notes, the time and a timer. It’s very useful, so Hovercraft! integrates it so you don’t have to think about it.
Installing and using Hovercraft!
Currently Hovercraft! is distributed as a python package on the Cheeseshop. That means that you install it with easy_install or pip. It’s also Python 3 only, so you need Python 3 installed first. I hope future versions will have easier installers for non-Python programmers.
So please test this for your next presentation! Find bugs, come with feedback. What is cool, what is hard, where do I need more docs?
Filed under: plone, python Tagged: impress, impress.js, keynote, powerpoint, presentations, prezi
