Sounds like you might find Literate.jl (ANN: Literate.jl) useful (disclaimer: I am the author of that package). Your usecase sounds just like the one I had for writing the package in the first place.
6 Likes