-
Notifications
You must be signed in to change notification settings - Fork 40
/
make.sh
executable file
·36 lines (29 loc) · 995 Bytes
/
make.sh
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
#!/usr/bin/env bash
# Fail on first exception.
set -e
# Clean out the build folder then replace the files we need to keep.
mkdir -p build
rm -rf build/*
cp .gitignore LICENSE README.md build
# Set up the folders we will need.
mkdir -p build/html
mkdir -p build/notebooks
mkdir -p build/solutions
cd build
cp -Rf ../course_content/images images
cp -Rf ../course_content/resources resources
for name in "numpy_intro" "matplotlib_intro" "cartopy_intro" "iris_intro"
do
#ipython nbconvert --to slides ../../course_content/${name}.ipynb
jupyter nbconvert --to notebook \
../course_content/notebooks/${name}.ipynb \
--ExecutePreprocessor.kernel_name=python3 \
--ExecutePreprocessor.timeout=180 \
--execute --allow-errors \
--output-dir ./notebooks/ \
--output ${name}.ipynb
# Build static (html) copies of the course content.
jupyter nbconvert --to html \
./notebooks/${name}.ipynb \
--output-dir ./html/
done