jkitchin / ox-ipynb

org-mode exporter to Jupyter notebooks
174 stars 40 forks source link

why not also export python src block #14

Closed yitang closed 4 years ago

yitang commented 5 years ago

Hi,

Thanks for writing this package. I found this is very useful.

I wonder if it's easy to include python src block as code? at the moment, it's exported as a markdown cell.

if we could do that, then we would able to include python script and export as a code cell, for example,

+include: "tmp.py" src python

gives a cell of the whole tmp.py script.

Thanks,

jkitchin commented 5 years ago

Why can't you do this?

+include: "tmp.py" src ipython

yitang commented 5 years ago

I tried but it seems org-mode doesn’t regconise ipython as a src block while exporting. Even though I’ve added ipython to the Babel lanague list.

Does it work for you?

jkitchin commented 5 years ago

I think you can use include files now with the commits above..