aboutsummaryrefslogtreecommitdiff
path: root/generate
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-12-08 12:32:34 +0100
committerCharles Cabergs <me@cacharle.xyz>2020-12-08 12:32:34 +0100
commit1f0b0b5fa5a770431c0232798c8dd1ca6efe0eb3 (patch)
tree75648c49d626acbd74222352e528392a3709d425 /generate
parentdb8649daef5658b84edf1191e53cff1f4b08ab27 (diff)
downloadcacharle.xyz-1f0b0b5fa5a770431c0232798c8dd1ca6efe0eb3.tar.gz
cacharle.xyz-1f0b0b5fa5a770431c0232798c8dd1ca6efe0eb3.tar.bz2
cacharle.xyz-1f0b0b5fa5a770431c0232798c8dd1ca6efe0eb3.zip
Added upyter notebooks
Diffstat (limited to 'generate')
-rwxr-xr-xgenerate12
1 files changed, 12 insertions, 0 deletions
diff --git a/generate b/generate
index 7b6492c..56ea15b 100755
--- a/generate
+++ b/generate
@@ -119,3 +119,15 @@ do
</li>" walks/index.html
echo "Generated walk at $gpx_path"
done
+
+for notebook_path in notebooks/*.ipynb
+do
+ notebook_dst_path=$(echo "$notebook_path" | sed 's_.ipynb_.html_')
+ jupyter-nbconvert "$notebook_path"
+
+ sed -i'' "/<!-- NOTEBOOKINDEX -->/ a\
+ <li> \
+ <a href=\"$notebook_dst_path\">$(basename $notebook_path | cut -d . -f 1 | tr '-' ' ')</a> \
+ <a href=\"$notebook_path\"> ($(basename $notebook_path))</a> \
+ </li>" index.html
+done