Permalink
Browse files

slides script

  • Loading branch information...
1 parent 276ae9f commit b73fa6336f73e3d523f8b9a1614a6ac8f10e36c1 @substack committed Sep 25, 2012
Showing with 15 additions and 0 deletions.
  1. +15 −0 slides.sh
View
15 slides.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+id=$(node -e 'console.log(Math.random().toString(16).slice(2))')
+dir="/tmp/slides/$id"
+mkdir -p $dir
+
+slides=$(grep '^!' slides.markdown | sed 's/.*(//; s/)$//')
+i=0
+echo $dir
+for slide in $slides; do
+ echo $slide
+ ln -s $PWD/$slide $dir/$(printf "%04d" $i)_$(basename "$slide")
+ i=$((i+1))
+done
+
+eog $dir/*

0 comments on commit b73fa63

Please sign in to comment.