# Better notebook2script

**URL:** <https://discourse.julialang.org/t/better-notebook2script/41733>\
**Category:** Package Announcements\
**Tags:** package, announcement, convert\
**Created:** [June 19, 2020, 4:44pm UTC](https://discourse.julialang.org/t/better-notebook2script/41733 "2020-06-19T16:44:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![SubhadityaMukherjee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/subhadityamukherjee/32/15983_2.png) [@SubhadityaMukherjee](https://discourse.julialang.org/u/SubhadityaMukherjee)\
**Post date:** [June 19, 2020, 4:44pm UTC](https://discourse.julialang.org/t/better-notebook2script/41733/1 "2020-06-19T16:44:40Z")

</div>

# Tired of manually exporting your notebook to script?

> **[GitHub - old-julia-codes/notebook2script.jl](https://github.com/old-julia-codes/notebook2script.jl)**
>
> Contribute to old-julia-codes/notebook2script.jl development by creating an account on GitHub.

## 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 🙂

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

---

<div class="post-metadata">

**Author:** ![Ian\_Slagle](https://avatars.discourse-cdn.com/v4/letter/i/b5a626/32.png) [@Ian\_Slagle](https://discourse.julialang.org/u/Ian_Slagle)\
**Post date:** [June 19, 2020, 6:16pm UTC](https://discourse.julialang.org/t/better-notebook2script/41733/2 "2020-06-19T18:16:46Z")

</div>

Neat!

I’ve found @ChrisRackauckas 's video to be quite helpful for making script into packages: [Developing Julia Packages - YouTube](https://www.youtube.com/watch?v=QVmU29rCjaA)

---

<div class="post-metadata">

**Author:** ![r2cp](https://avatars.discourse-cdn.com/v4/letter/r/67e7ee/32.png) [@r2cp](https://discourse.julialang.org/u/r2cp)\
**Post date:** [June 19, 2020, 6:39pm UTC](https://discourse.julialang.org/t/better-notebook2script/41733/3 "2020-06-19T18:39:04Z")

</div>

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

> [@Make your Julia package in 10 minutes](https://discourse.julialang.org/t/make-your-julia-package-in-10-minutes/41368):
>
> I built my blog some time ago using [Franklin.jl](https://franklinjl.org/) and Bootstrap, and I was just waiting for the suitable blogpost material. It’s a common question here how to make your own package, so I decided to write a post about it. Here it is:

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [June 19, 2020, 6:40pm UTC](https://discourse.julialang.org/t/better-notebook2script/41733/4 "2020-06-19T18:40:33Z")

</div>

Note that you can also just use the [NBInclude package](https://github.com/stevengj/NBInclude.jl) to directly run notebook files or a portion thereof; no need to convert them.

---

<div class="post-metadata">

**Author:** ![Paul\_Soderlind](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_soderlind/32/1753_2.png) [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Post date:** [June 19, 2020, 8:03pm UTC](https://discourse.julialang.org/t/better-notebook2script/41733/5 "2020-06-19T20:03:41Z")

</div>

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)](https://github.com/oxinabox/ipynb2LiterateJulia)

---

<div class="post-metadata">

**Author:** ![SubhadityaMukherjee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/subhadityamukherjee/32/15983_2.png) [@SubhadityaMukherjee](https://discourse.julialang.org/u/SubhadityaMukherjee)\
**Post date:** [June 19, 2020, 8:09pm UTC](https://discourse.julialang.org/t/better-notebook2script/41733/6 "2020-06-19T20:09:04Z")

</div>

Oh thank you so much! I will check it out 🙂 @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. 🙂 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
