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.
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:
:TOhtml
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[0]. 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):
If that’s still too much, check out pandoc[1], which can convert a markdown file into a Slidy slideshow[2] (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[3] 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).
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.
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[0]. Here’s an example that works on a mac, (changepbcopytoxclipif you’re on linux; also note that you can easily do this on a text selection from inside of vim):If that’s still too much, check out
pandoc[1], which can convert a markdown file into a Slidy slideshow[2] (or S5, or some others, though I prefer the minimalist style of Slidy).One issue with this is that you just get very basic code formatting. No problem, just add highlight.js[3] 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).[0] http://www.andre-simon.de/doku/highlight/en/highlight.html
[1] http://johnmacfarlane.net/pandoc/README.html#producing-slide-shows-with-pandoc
[2] http://www.w3.org/Talks/Tools/Slidy2
[3] http://softwaremaniacs.org/soft/highlight/en/
I have documented installation instructions now. Thanks!