forked from basbossink/presentations
/
Rakefile
42 lines (32 loc) · 968 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
require 'rake/clean'
CLEAN.include(FileList['*.html','*.pdf','*.png'])
# Windows has a name clash with builtin dos convert command
cov = if ENV.has_key? 'CONVERT' then
"\"#{ENV['CONVERT']}\""
else
"convert"
end
task :default => ['slides.html','notes.pdf']
rule '.png' => '.gnu' do |t|
sh "gnuplot #{t.source}"
end
rule '.png' => '.svg' do |t|
sh "#{cov} #{t.source} #{t.name}"
end
rule '.pdf' => '.markdown' do |t|
sh "markdown2pdf -N -o #{t.name} #{t.source}"
end
file 'slides.html' => 'slides.markdown' do
sh "pandoc -w slidy --offline -s slides.markdown > slides.html"
end
file 'languages.png' => 'language-study.list' do
sh "perl language-study.list2dot language-study.list | dot -Tpng > languages.png"
end
file 'slides.markdown' => [
'lazy-eager-single-multi.png',
'dynamic-static-strong-weak.png',
'languages.png',
'parabola.png',
'curve.png'
]
file 'notes.markdown' => []