Notebook -> module conversion

get_module_text[source]

get_module_text(notebook_path)

Read ipynb file and get all code from code cells with #export or # export at the beginning

write_module_text[source]

write_module_text(module_text, notebook_name, lib_path=Path('src'))

Write module_text to lib_path/notebook_name as .py file

clear_all_modules[source]

clear_all_modules(lib_path=Path('src'))

Clear all .py files from lib_path to reset your .py exported files

simple_export_one_nb[source]

simple_export_one_nb(nb_path, lib_path=Path('src'))

clear_all_modules in lib_path for each notebook in nbs_path get_module_text and write_module_text to lib_path All .py files in lib_path will be removed and replaced

simple_export_all_nb[source]

simple_export_all_nb(nbs_path=Path('.'), lib_path=Path('src'), clear=False)

clear_all_modules in lib_path if clear=True for each notebook in nbs_path get_module_text and write_module_text to lib_path All .py files in lib_path will be removed and replaced

simple_export_all_nb(lib_path=Path('./test_example'))
Converted test_example/core.py
Nothing to Convert test_example/index.ipynb
Converted test_example/convert.py
simple_export_one_nb(Path('00_core.ipynb'),lib_path=Path('./test_example'))
Converted test_example/core.py