On Windows 10, I am trying to save a Jupyter notebook as a pdf, under a name that will change for every run of the notebook.
Here is what I have so far:
name1 = 'July'
name2 = 'August'
jupyter_nb_filename = '{}_vs_{}'.format(name1,name2)
!jupyter nbconvert --output-dir="C:\\mydir\\" --output=jupyter_nb_filename --to pdf --TemplateExporter.exclude_input=True mynotebook.ipynb
I looked in the documentation but could not figure it out.
Any help would be greatly appreciated.
You have to prefix the variable name with $
for it to be interpreted as a variable in a console command. See this question.
!jupyter nbconvert --output-dir="C:\\mydir\\" --output=$jupyter_nb_filename --to pdf --TemplateExporter.exclude_input=True mynotebook.ipynb