sq_02_python_data_science/jupyter_book/extract_attachments.sh

13 lines
275 B
Bash
Raw Permalink Normal View History

# Extrahiert aus Python-Notebooks alle mittels Drag&Drop inkludierten Bilder.
awk '
/"attachments"/ {
getline;
gsub(/[":]/,"",$1)
file=$1;
getline;
gsub(/^[^:]*: "/, "")
sub(/"/, "")
system("echo " $0 " | base64 -d > _build/latex/attachment:"file)
}' *.ipynb