Slideshows in Vroom: So Noted

Occasionally I give presentations.  Most often at work, but sometimes at my local PerlMongers.  Typically, a presentation is accompanied by some sort of slideshow.  And there are many, many different applications out there to create slideshows in.  Power Point is sort of the default of these, and I’ve used it before, and it sucks.  Google Docs Presentations uses the same basic model, and I’ve used that before too, and it sucks slightly less ... but it still sucks.  I just want some basic slides with a little bit of code on it, and maybe some text, but mostly in the “header” category.  I don’t like text-heavy slides.  You end up just reading your slides to people, most of whom can actually read themselves, and tend to be a bit insulted when you feel the need to do it for them.

So, just a bit of text, a bit of code, and that’s all I really need.  Transitions are optional; fancy transitions are even optional-er.

So, for my first PerlMongers presentation, I decided to try Vroom.  Vroom is brought to us by Ingy döt Net, who, like all my favorite CPAN authors (such as schwern, mst, the Damian, and many others), can always be counted on for an idea which is completely and utterly insane ... and also completely and utterly cool.

Vroom is, quite simply, a way to do slideshows in vi.  Now, if you happen to be on the wrong si....er, other side, I meant to say—of the vi/emacs war, this is probably pretty anticlimactic for you.  But, if you are a vi afficianado such as I am, this is pretty damn awesome.  And not nearly as tricky as you might think.  There’s a file (called slides.vroom, naturally enough) where you type in all your slide content.  You separate each slide with a simple

----
line, and you can tack on various things at the end of that to control the formatting of the following slide (e.g. centering, amount of indent, etc).  And ... well, actually, that’s pretty much it.  Once you type in all your slide content, you run a command, the slides themselves (which are just files for vi) are generated, and it fires up vi (actually, vim, to be precise) with a nifty set of macros enabled (space goes to the next file and backspace goes to the previous file, that sort of thing) and Bob’s yer uncle.  I tend to make my terminal take up the entire screen and make the font a lot bigger, but that’s basically it.  Bam: you’ve got yourself a slideshow.


So this is how I did my first PerlMongers presentation, which was about Method::Signatures.  And it was excellent.  (Well, Vroom was excellent, I mean ... whether I was excellent or not, you’d have to ask someone who was there.) But there was just one downside.  Suppose you couldn’t attend?  I mean, if you are a Perl hacker, and you happen to live or work in the Los Angeles area, you could have been there, but that actually leaves out a heck of a lot of people, if you think about it.  And not even all of them could be there, I’m sure.  So it would be nice to be able to put my slides online, so other people can share too.

But here we have a problem.  Since I favor minimal slides, my slideshows are great for presentation: they complement what I’m saying without distracting from it.  On the other hand, once my snappy patter is removed from the picture, the slides are pretty useless: they just don’t convey enough information to be usable on their own.  Dilemma.

One of the things I did in my first Method::Signatures presentation was to steal a couple of slides from schwern’s first Method::Signatures presentation.  I could do that because schwern added that slideshow to our GitHub repo, in the “talks” directory.  If you click that link, you’ll see a PDF there that contains all schwern’s slides ... and also all his notes for the presentation.  The notes are underneath the slides, in a smaller font, like so:

which is excellent for sharing.  Now you still have the minimal slides, but you can also get a feel for what’s going on in the presentation.  Just like comparing studio and live versions of the same song, they won’t be exactly the same, but close enough.  The guys who got to hear it live will always feel a bit superior, but those who are only familiar with the album version can certainly say they know the song too.

So, being impressed with that sort of thing, I considered trying to use Keynote (which is what schwern had used) for my own presentations.  But Keynote is (as far as I was able to determine) Mac only.  I don’t do Mac.  I actually tried once, for a while.  But, while I can stand an OS that isn’t particularly keyboard-friendly, I just can’t abide an OS which is keyboard-antagonistic.  (And now I’ve gotten the Mac people and the emacs people up in arms against me.  Oh, well.) So Keynote itself was out.  But, hey: Vroom is open-source, and I know from experience that Ingy is very open to patches.  So maybe I could fiddle a bit ...

Here’s the opening slide of my second PerlMongers presentation (also on Method::Signatures, delivered just a few months ago):

---- center
Method::Signatures

a how-to

I chnaged that slightly.  Now it looks like this:
---- center
% Title Slide
Method::Signatures

a how-to

====
Today I want to talk about Method::Signatures from the perspective of "how."  Mostly I won't cover the "why," although some  of that will come out too.  If you need more on the "why," see the `talks/` directory in the GitHub repo.

Before we cover the "how," let's briefly cover the "what."
As you can see, all I’ve done is add some notes, separated from the content with a little marker, and added a title.  The title is optional.


So, what does this gain us?  Well, first off it creates a notes.txt file, which will look like so:

           -- Title Slide --

Today I want to talk about Method::Signatures from the perspective of "how."  Mostly I won't cover the "why," although some  of that will come out too.  If you need more on the "why," see the `talks/` directory in the GitHub repo.

Before we cover the "how," let's briefly cover the "what."


<Space>    -- Slide 2 --
So you can see how the titles can be useful there, and you can also see what happens if you don’t give a slide a title.  You take this notesfile and just print it out, or maybe even just bring it up on your phone, and you’ve got a handy guide to help you keep track of where you are and keep you on track.  (The ”<Space>” marker is just to remind me what button to hit to go to the next slide.  Sometimes I’m a bit thick.) I put a title on the first slide of each different group of slides, but you could put a title on every slide if you wanted to.  You could also add timing info in your notes so that you could keep track of whether you’re running behind or actually ahead of schedule.


But notes.txt is just the gravy on the cake.  The real awesomesauce is in the HTML version.  Vroom could always generate HTML versions of your presentation, complete with a table of contents.  The links to each slide were titled with the first several characters of that slide’s content; now we can use the slide’s title, if you give it one.  But the important part is that the notes are now printed underneath the slides on the HTML versions, in a smaller font, just like Keynote does.

Of course, this still isn’t a PDF like Keynote would give us.  But we can fix that too, using the nifty open-source program wkhtmltopdf.  You’ll need to make sure you download a static version, because the dynamic version likely won’t handle more than one HTML file in a PDF.  (Important other note: if you want to be able to get images into your PDF, you’ll need the not-newest version, too ... basically just download this one.) Then you just invoke it with the -O Landscape option and it works pretty well.  I had some issues with file ordering on my computer—for some reason, 08z.html sorted before 08.html, whereas 08a.html came after it.  My recollection of ASCII is a bit fuzzy, but I’m pretty sure period doesn’t come in the middle of the alphabet.  Anyway, I just hacked together a simple script, which I cleverly named gen_pdf.

And now you can see the final PDF in the talks dir on the Method::Signatures repo.  And Ingy accepted my patch and released a new version of Vroom—0.28—so you can try it out too.

(Addendum: I got the opportunity to deliver this same talk again at YAPC 2013, which was pretty awesome.  I also got the chance to meet Ingy again and chat about Vroom.  No promises, but perhaps I’ll be doing more patches in the future.  Yay YAPC!)

2 Comments

Need to bookmark this and try at home when weather is bad! Thanks for sharing!

As a VI loyalist you didn't offend me once. Thanks for posting!

Leave a comment

About Buddy Burden

user-pic 7 years in California, 17 years in Perl, 26 years in computers, 46 years in bare feet.