-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconvert.sh
More file actions
executable file
·50 lines (39 loc) · 1.06 KB
/
convert.sh
File metadata and controls
executable file
·50 lines (39 loc) · 1.06 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
for dir in blocks data_types introduction io oop plots maps
do
cd $dir
for f in *py
do
echo $f
if [ $f = "pyngl.py" ]; then
echo "============================== PyNGL not processed"
continue
fi
# Convert .py to ipynb
jupytext --to notebook $f
fout=`echo $f | sed "s/.py/.ipynb/"`
# execute notebooks
jupyter nbconvert --execute --to notebook $fout
final_file=`echo $fout | sed "s/ipynb/nbconvert.ipynb/"`
mv $final_file $fout
done
cd ..
done
cd misc
for f in nemo.py eof_analysis.py interpol.py practical_session.py shapefiles.py
do
echo $f
# Convert .py to ipynb
jupytext --to notebook $f
fout=`echo $f | sed "s/.py/.ipynb/"`
# execute notebooks
jupyter nbconvert --execute --to notebook $fout
final_file=`echo $fout | sed "s/ipynb/nbconvert.ipynb/"`
mv $final_file $fout
done
for f in dask_covariance.py dask_examples.py mean_sst_dask.py
do
echo $f
# Convert .py to ipynb
jupytext --to notebook $f
done
cd ..