I'm trying to write python code in my jupyter notebook, that will export the whole current notebook to html/pdf.
I know I can do something like that:
import subprocess
subprocess.call("jupyter nbconvert notebook.ipynb")
But that requires the file name, which is not known inside the notebook.
I saw many "hacks" to get the notebook file name, like this one: How do I get the current IPython Notebook name but I prefer to find a better solution.
Is there a smart way to export the current running notebook to a html/pdf file?
Thanks.