Skip to content

Commit

Permalink
nb_clean fix
Browse files Browse the repository at this point in the history
  • Loading branch information
montyvesselinov committed Jul 29, 2024
1 parent 9a81219 commit 0313783
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/MadsNotebooks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,11 @@ function notebook_export(rootname::AbstractString; notebook_directory=joinpath(M
@info("Processing $(f) in directory $(d) ...")
c = pwd()
cd(d)
Mads.runcmd("python3 ~/system/notebook-clean.py $(r).ipynb"; quiet=false, pipe=false)
Mads.runcmd("rm -fR $(r)_files")
nb_clean = joinpath(ENV["HOMEPATH"], "system", "notebook-clean.py")
if isfile(nb_clean)
Mads.runcmd("python3 $(nb_clean) $(r).ipynb"; quiet=false, pipe=false)
Mads.runcmd("rm -fR $(r)_files")
end
Mads.runcmd("python3 -m nbconvert --to script $(r).ipynb")
@info("Julia script file created: $(r).jl")
Mads.runcmd("python3 -m nbconvert --to html $(r).ipynb")
Expand Down

0 comments on commit 0313783

Please sign in to comment.