diff --git a/Makefile b/Makefile index 1191ca9..14e8206 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,10 @@ -.PHONY: serve clean +.PHONY: serve clean pdf SOURCES=images custom.css reveal.js -pycon-2014.slides.html: pycon-2014.ipynb +pycon-2014.slides.html: pycon-2014.ipynb reveal.tpl ipython nbconvert --RevealHelpTransformer.url_prefix=reveal.js --to slides --template reveal.tpl pycon-2014.ipynb + +pdf: pycon-2014.slides.html fixme.py python fixme.py clean: diff --git a/fixme.py b/fixme.py index 1b7cdb9..00656b9 100644 --- a/fixme.py +++ b/fixme.py @@ -9,6 +9,7 @@ #----------------------------------------------------------------------------- import io +import re notebook = 'pycon-2014.ipynb' path = notebook[:-6] + '.slides.html' @@ -19,6 +20,10 @@ for i, line in enumerate(data): if line[:64] == flag: data[i] = data[i].replace('color:#000 !important;', '') + data[i] = re.sub('data-fragment-index="[0-9]+"', "", data[i]) + data[i] = re.sub('class="[0-9]+"', "", data[i]) + data[i] = data[i].replace('class="fragment', 'class="') + data[i] = data[i].replace('class=""', '') with io.open(path, 'w') as out_file: out_file.writelines(data)