From 5bb9d6d3dfba750b7e0cbcfe26733b17e8685219 Mon Sep 17 00:00:00 2001 From: ziembla Date: Sun, 10 Dec 2017 18:38:25 +0100 Subject: [PATCH] help message for nbdiff_checkpoint --- docker/bin/nbdiff_checkpoint | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docker/bin/nbdiff_checkpoint b/docker/bin/nbdiff_checkpoint index ffbb21c..2969e1b 100755 --- a/docker/bin/nbdiff_checkpoint +++ b/docker/bin/nbdiff_checkpoint @@ -1,9 +1,16 @@ #!/bin/bash +if [ "$#" -ne 1 ]; then + echo "usage: nbdiff_checkpoint NOTEBOOK.ipynb" + echo + echo "Show differences between given jupyter notebook and its checkpointed version (in .ipynb_checkpoints subdirectory)" + exit +fi + DIRNAME=$(dirname "$1") BASENAME=$(basename "$1" .ipynb) WORKING_COPY=$DIRNAME/$BASENAME.ipynb CHECKPOINT_COPY=$DIRNAME/.ipynb_checkpoints/$BASENAME-checkpoint.ipynb -echo "How change $CHECKPOINT_COPY into $WORKING_COPY" +echo "----- Analysing how to change $CHECKPOINT_COPY into $WORKING_COPY -----" nbdiff "$CHECKPOINT_COPY" "$WORKING_COPY" --ignore-details