Skip to content

Instantly share code, notes, and snippets.

@barefootcoder
Last active December 17, 2015 18:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save barefootcoder/5654521 to your computer and use it in GitHub Desktop.
Save barefootcoder/5654521 to your computer and use it in GitHub Desktop.
This is the little script I put together to turn my Vroom slides into a PDF. It uses `wkhtmltopdf` to do the hard work.
#! /bin/bash
# To make this work, you will need Vroom 0.28 or later. Slide notes are optional, but
# recommended. Slide titles won't be used for this application.
#
# Earlier versions of Vroom will work if you add the dashes in front of the vroom commands
# (e.g. `vroom -compile` and `vroom -html`). But the HTML is formatted a bit differently, so
# I make no promises that it will come out looking as good as the newest versions.
# You'll also need wkhtmltopdf. If you don't have it, you can get it here:
# http://code.google.com/p/wkhtmltopdf/
#
# Note that you will almost certainly need the static version in order to handle multiple HTML
# files. See the README file for full details:
# https://github.com/antialize/wkhtmltopdf/blob/master/README_WKHTMLTOPDF
# for some reason, just doing an ls of html/ doesn't get the slides in the right order
# this seems to fix it
vroom compile
slides="$(ls 0* | perl -lne 'print "html/$_.html"')"
#echo $slides
vroom html
wkhtmltopdf -O Landscape $slides MShowto.pdf
@ingydotnet
Copy link

With Vroom-0.28 you can leave out the dashes before compile and html.

@barefootcoder
Copy link
Author

Good call, Ingy. I've updated the code to reflect this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment