How can I export the current notebook (from inside the notebook itself, using Python) to HTML (to a custom output path)?
By looking at nbconvert docs, you'll see that you can use --to html method:
import os os.system('jupyter nbconvert --to html yourNotebook.ipynb')
This will create a yourNotebook.html file inside yourNotebook.ipynb folder.
yourNotebook.html
yourNotebook.ipynb