Converting S5 slides to a single PDF on Mac OSX
Posted by James Mead Mon, 25 Jan 2010 20:33:49 GMT
I used S5 in combination with Webby for my Ruby & Cocoa presentation at RubyManor. I hate PowerPoint with a passion and haven’t done enough presentations to be bothered to learn KeyNote. So I was much happier generating my slides from a plain text file marked up in Textile.
However, like Paul Battley, I found that S5 doesn’t work so well when someone wants to take those slides and put them in a video. Anyway, I’ve managed to convert my S5 slides into a single PDF using a combination of webkit2png and a custom Automator workflow :-
Ruby Script using webkit2png
#!/usr/bin/env ruby
NUMBER_OF_SLIDES = 94
SEQUENCE_FORMAT = "%0#{Math.log10(NUMBER_OF_SLIDES).to_i}d"
HOST = "jamesmead.local"
PATH = "/presentations/ruby-and-cocoa-ruby-manor-2009-12-14/"
BASE_URL = "http://#{HOST}#{PATH}"
(0...NUMBER_OF_SLIDES).each do |index|
anchor = "#slide#{index}"
url = "#{BASE_URL}#{anchor}"
sequence = SEQUENCE_FORMAT % index
puts %x[webkit2png --fullsize --filename=slide-#{sequence} #{url}]
raise unless $?.success?
endCustom Automator Workflow


I also like webby for presentations. Forgive me for the silly question, but why cast the sequence as shown above. Wouldn’t
index + 1be sufficient? Is there a specific reason I cant think of to use aMath.log10function? Thanks.