Better notebook2script

Tired of manually exporting your notebook to script?

Usage

  • Add #export to the start of every cell you want in the final export
  • julia notebook2script.jl “path_to_input.ipynb” “path_to_output”
  • No need to add a .jl
  • Done :slight_smile:

I have no idea how to make this into a package. Any help would be great

Neat!

I’ve found @ChrisRackauckas 's video to be quite helpful for making script into packages: Developing Julia Packages - YouTube

1 Like

Excellent contribution :smile:. In addition to the video, I also found this tutorial, made by @anon37204545, very useful and instructive.

2 Likes

Note that you can also just use the NBInclude package to directly run notebook files or a portion thereof; no need to convert them.

5 Likes

Sounds useful. As a reference, you may consider GitHub - oxinabox/ipynb2LiterateJulia: NBConverter stuff to convert Jupyter Notebooks in to Julia Literate.jl files (This is the opposite of Literate.jl)

1 Like

Oh thank you so much! I will check it out :slight_smile: @Ian_Slagle

@r2cp Thank you!! I just started using julia a few weeks back and Im loving it so much. I will surely check out that tutorial.

@stevengj Hello. I had seen the package but it wasnt exactly what I wanted. This would need to execute the notebook first. I just wanted to add one line while writing the notebook. To separate it from the mess of a playground mine becomes. And only that cell gets exported.

@Paul_Soderlind I have no idea what Literate.jl is. Thank you for sharing. I will check it out. :slight_smile: It has just been 3 weeks since I started Julia. Lots to explore.

I really love this community!! Thank you so much for the motivation everyone. It means a lot

1 Like