dnanhkhoa / nb_black

A simple extension for Jupyter Notebook and Jupyter Lab to beautify Python code automatically using black.
MIT License
368 stars 41 forks source link

Command line version? #23

Closed Mistobaan closed 4 years ago

Mistobaan commented 4 years ago

Would it be possible to run this from the command line on a saved notebook?

nb_black mynotebook.ipynb
dnanhkhoa commented 4 years ago

Hi @Mistobaan,

I don't think it's possible to do that using this extension but you can do that in another way by converting your notebook to Python file, then format it using black (it supports cmd already) then get back to notebook format. If works, you can wrap up these 3 steps into a bash file or something like that.