Is OSX only?
In principle the script is portable. The very first commit shelled out to run stty, but now the terminal is configured by the standard Ruby (1.9) library io/console.
This is a total hack. It is procedural, uses a global variable, it has not been parametrized or generalized in any way. It was tailor-made for what I exactly wanted but some people in the audience asked for the script. Even if it is quick and dirty I am very happy to share it so I have commented the source code and there you go!
I don’t see anything super OSX specific, but what I mean is that it might be, since that’s what computer fxn was using.
I was partly wondering because if it was then a tag of “osx” would be handy. Anyways, i’d have look at this more closely to see if it’s usable in some form on ubuntu bash in gnome-terminal.
Very cute. Interesting to see that even with the advent of GUIs and pretty graphics, some prefer to go “back in time” to terminals.
Couldn’t get it to run because of some problems building the dependencies (for which I do not fault the author at all, mind you, given that it’s a total hack).
However, it seems like much more work to build this than it is to just write those text files in a normal editor and export code to html. Here’s how to do it in vim:
To be fair, that method is flawed because it just creates a single HTML file, which is not the same as a slideshow.
Another alternative is to export code to RTF and just paste that in Keynote or Powerpoint or Impress. You can do this using highlight. Here’s an example that works on a mac, (change pbcopy to xclip if you’re on linux; also note that you can easily do this on a text selection from inside of vim):
cat codes.scala | highlight -S scala -O rtf -k Menlo -K 20 | pbcopy
If that’s still too much, check out pandoc, which can convert a markdown file into a Slidy slideshow (or S5, or some others, though I prefer the minimalist style of Slidy).
pandoc -t slidy -s slideshow.md -o slideshow.html
One issue with this is that you just get very basic code formatting. No problem, just add highlight.js to the generated html file. It supports 52 languages out of the box, will guess the language in the <code> block, and will highlight them automatically (yes, you can specify the language if necessary).
<link rel="stylesheet" href="http://yandex.st/highlightjs/7.2/styles/default.min.css">
I have documented installation instructions now. Thanks!