I want to re-make only edited notebooks.

Not all of them each time.
This commit is contained in:
Simon Forman
2018-06-06 12:48:16 -07:00
parent 09276fdc13
commit 8a0a5e9f30
4 changed files with 12321 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
#docs := $(wildcard *.ipynb)
#docs_html := $(patsubst %.ipynb,%.html,$(docs))
.PHONY: poop nospaces yesspaces
# https://stackoverflow.com/a/45531875
# Make cannot handle spaces in filenames, so temporarily rename them
nospaces:
rename -v 's/ /%20/g' *\ *
# After Make is done, rename files back to having spaces
yesspaces:
rename -v 's/%20/ /g' *%20*
poop: *.ipynb
make "$(patsubst %.ipynb,%.html,$<)"
%.html : %.ipynb
python -m nbconvert --to html $<
%.md : %.ipynb
python -m nbconvert --to markdown $<
%.rst : %.ipynb
python -m nbconvert --to rst $<