chore: Move command to run jupyter notebooks from Makefile to scripts

This commit is contained in:
Vikash Kothary 2022-01-16 20:49:20 +00:00
parent 1394874993
commit 198f9851a5
3 changed files with 9 additions and 5 deletions

View File

@ -33,10 +33,6 @@ run:
init:
@${POETRY} install
.PHONY: notebooks #: Run jupyter notebooks.
notebooks:
@${PYTHON} -m jupyter ${JUPYTER_OPTION}
%:
@test -f scripts/${*}.sh
@${SHELL} scripts/${*}.sh

View File

@ -23,7 +23,8 @@ ANKISYNCD_SESSION_DB_PATH=./session.db
MKDOCS_OPTION=serve
## Jupyter
JUPYTER_OPTION=lab
### JUPYTER_CMD
### JUPYTER_NOTEBOOK_DIR
## Path
PATH:=.venv/bin:${PATH}

7
scripts/jupyter.sh Normal file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
# file: jupyter.sh
# description: Run Jupyter Notebooks.
[[ ! -z "${JUPYTER_CMD}" ]] || JUPYTER_CMD=lab
[[ ! -z "${JUPYTER_NOTEBOOK_DIR}" ]] || JUPYTER_NOTEBOOK_DIR=docs/src/notebooks
${JUPYTER} ${JUPYTER_CMD} --notebook-dir=${JUPYTER_NOTEBOOK_DIR}