The idea for the tutorials is that they will be python files, and we make a script to convert them to html
I suggest we do the following:
- Use single hash comments for the text we want in the webpage
- Have some kind of tag for any images that need to be generated, I suggest using triple and double hash comments for the code that generates them, with the triple hash providing the information needed for including it
ham.spagghetti_plot()
### generates: example.png
## plt.savefig("example.png")
Parsing this would be pretty simple:
- make a unique directory for each python file
- convert all single hash to text for the html
- convert all triple hash to image tags
- all non-comments go into python code snippets
- Then, to generate images:
- uncomment all double comments
- run script
The idea for the tutorials is that they will be python files, and we make a script to convert them to html
I suggest we do the following:
Parsing this would be pretty simple: