-
-
Notifications
You must be signed in to change notification settings - Fork 121
/
doc_to_html.bat
22 lines (21 loc) · 850 Bytes
/
doc_to_html.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
@echo off
call python -m art text "Doc 2 HTML"
if not exist "doc_html" mkdir doc_html
for %%f in (doc_html\*) do (del %%f)
copy Document\*.ipynb doc_html
cd doc_html
echo --------------------------
echo Document.ipynb is running!
call python -m nbconvert --to html_toc --execute Document.ipynb --no-prompt --TagRemovePreprocessor.enabled=True --TagRemovePreprocessor.remove_cell_tags={\"html_hide\"} --log-level=ERROR
move Document.html index.html
if ERRORLEVEL 1 (echo Document.ipynb Failed! & cd .. & exit /b 0) else (echo Document.ipynb Done!)
echo --------------------------
del Document.ipynb
for %%f in (*.ipynb) do (
echo %%f is running!
call python -m nbconvert --to html --execute %%f --no-prompt --log-level=ERROR
if ERRORLEVEL 1 (echo %%f Failed! & cd .. & exit /b 0) else (echo %%f Done!)
echo --------------------------
del %%f
)
cd ..