diff --git a/tools/interactive/interactivetool_jupyter_notebook.xml b/tools/interactive/interactivetool_jupyter_notebook.xml index 8c4af7ccbc6..3ad598ceed0 100644 --- a/tools/interactive/interactivetool_jupyter_notebook.xml +++ b/tools/interactive/interactivetool_jupyter_notebook.xml @@ -1,4 +1,4 @@ - + quay.io/bgruening/docker-jupyter-notebook:ie2 @@ -21,8 +21,10 @@ mkdir -p ./jupyter/outputs/ && mkdir -p ./jupyter/data && - #set $cleaned_name = re.sub('[^\w\-\.]', '_', str($input.element_identifier)) - ln -sf '$input' './jupyter/data/${cleaned_name}' && + #for $count, $file in enumerate($input): + #set $cleaned_name = str($count + 1) + '_' + re.sub('[^\w\-\.\s]', '_', str($file.element_identifier)) + ln -sf '$file' './jupyter/data/${cleaned_name}.${file.ext}' && + #end for ## change into the directory where the notebooks are located cd ./jupyter/ && @@ -35,18 +37,17 @@ jupyter trust ./ipython_galaxy_notebook.ipynb && jupyter lab --allow-root --no-browser --NotebookApp.shutdown_button=True && cp ./ipython_galaxy_notebook.ipynb '$jupyter_notebook' - #else: - #set $cleaned_name = re.sub('[^\w\-\.]', '_', str($input.element_identifier)) - cp '$mode.ipynb' ./${cleaned_name}.ipynb && - jupyter trust ./${cleaned_name}.ipynb && - + #set $noteboook_name = re.sub('[^\w\-\.\s]', '_', str($mode.ipynb.element_identifier)) + cp '$mode.ipynb' './${noteboook_name}.ipynb' && + jupyter trust './${noteboook_name}.ipynb' && #if $mode.run_it: jupyter nbconvert --to notebook --execute --output ./ipython_galaxy_notebook.ipynb --allow-errors ./*.ipynb && + #set $noteboook_name = 'ipython_galaxy_notebook' #else: jupyter lab --allow-root --no-browser --NotebookApp.shutdown_button=True && #end if - cp ./ipython_galaxy_notebook.ipynb '$jupyter_notebook' + cp './${noteboook_name}.ipynb' '$jupyter_notebook' #end if ]]> @@ -64,7 +65,7 @@ help="This option is useful in workflows when you just want to execute a notebook and not dive into the webfrontend."/> - +