Skip to content

Commit

Permalink
added pdfs for brian in statinf
Browse files Browse the repository at this point in the history
  • Loading branch information
jtleek committed May 28, 2014
1 parent 72d6772 commit 1125e7d
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
28 changes: 28 additions & 0 deletions 06_StatisticalInference/makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
DELAY = 1000
RMD_FILES = $(wildcard */index.Rmd)
HTML_FILES = $(patsubst %.Rmd, %.html, $(RMD_FILES))
PDF_FILES = $(patsubst %.html, %.pdf, $(HTML_FILES))
PDF_FILES2 = $(patsubst %/index.pdf, lectures/%.pdf, $(PDF_FILES))

lectures: $(PDF_FILES2)
lectures/%.pdf: %/index.pdf
cp $< $@

files:
@echo $(RMD_FILES)
@echo $(HTML_FILES)
@echo $(PDF_FILES)

html: $(HTML_FILES)
pdf: $(PDF_FILES)
all: html pdf

zip: $(PDF_FILES)
zip all_pdf_files.zip $^

%/index.pdf: %/index.html
casperjs makepdf.js $< $@ $(DELAY)

%/index.html: %/index.Rmd
cd $(dir $<) && Rscript -e "slidify::slidify('index.Rmd')" && cd ..

10 changes: 10 additions & 0 deletions 06_StatisticalInference/makepdf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
var casper = require('casper').create({viewportSize:{width:1500,height:1000}});
var args = casper.cli.args;
var imgfile = (args[1] || Math.random().toString(36).slice(2))
casper.start(args[0], function() {
this.wait(args[2], function(){
this.captureSelector(imgfile, "slides");
});
});

casper.run();

0 comments on commit 1125e7d

Please sign in to comment.