RunSlide 0.3
------------
**WARING: This is the THIRD release - it is very likely that EVIL stuff happens**
**** DO NOT RUN THE INCLUDED SERVER IN PRODUCTION ENVIRONMENTS ****
This small program generates interactive slides of HTML5 presentations.
Currently it enables users to edit code snippets within a slide, to run it, and
to display its output in a visually pleasant way.
You no longer need to switch between presentation software and IDEs or terminals
during your programming talks.
RunSlide is inspired by Google's present tool, but unlike present it is not
limited to the Go language.
The program starts an http server and offers a WebSocket connection.
HTML5 presentations use this WebSocket to send code snippets to RunSlide, which
starts the defined interpreter and responds with the output generated by the
code snippet.
RunSlide makes use of Go templates - before calling the interpreter, it may embed
the code snippet in a text file. So you can add include commands or helper
functions in a code template instead of showing them in your slide (see fibgo.tpl
as example).
Refer to the fib.html sample presentation to create your own slides.
Modify static/styles.css to change colors/fonts etc.
Installation:
-------------
- Install Go (golang.org)
- Run as root "go get code.google.com/p/go.net/websocket"
recent go releases support user based configuration:
set -x GOPATH $HOME/go/GO_PKG
go env
GOARCH="amd64"
..
GOPATH="/home/you/go/GO_PKG"
..
go get code.google.com/p/go.net/websocket
- extract RunSlides package
Raspberry Pi configuration for the Pi and More workshop
------------------------------------------------------
- edit runslide.go and adjust the scpDestination variable
- optional: install the wiring pi gpio utility (see comment in start_gpio_script2.sh)
- install iwatch
- mkdir /home/pi/incoming
- mkdir /home/pi/incoming/tools
- edit/add these files:
cat /etc/iwatch/iwatch.xml
<?xml version="1.0" ?>
<!DOCTYPE config SYSTEM "/etc/iwatch/iwatch.dtd" >
<config>
<guard email="root@localhost" name="IWatch"/>
<watchlist>
<title>Operating System</title>
<contactpoint email="root@localhost" name="Administrator"/>
<path type="single" events="default" exec="/home/pi/incoming/tools/start_gpio_script2.sh %f" alert="off" syslog="on">/home/pi/incoming</path>
</watchlist>
</config>
cat /home/pi/incoming/tools/start_gpio_script2.sh
#!/bin/bash
killall -9 lua
# optional:
for i in {0..20}; do gpio mode $i out; done
cd /home/pi/incoming
lua $1 &
Start a presentation:
---------------------
- cd into the runslides directory
- execute "go run runslide.go"
Now a http server listens on port 12345.
Open the URL "http://127.0.0.1:12345/piandmore5.html" in Chrome (34+), Firefox (29+) or
Opera (12).
Use arrow keys/ENTER/SPACE to navigate through the slides. Press F11 for
fullscreen mode.