oscar-system / book.oscar-system.org

https://book.oscar-system.org
0 stars 6 forks source link

Script for collecting examples form Oscar source repo (and first version of examples) #6

Closed lkastner closed 3 months ago

lkastner commented 3 months ago

This is a first version of a script collecting the examples from the book into the md files.

It goes into the directory of the Oscar source and collects from the test/book folder in the right order and just assembles everything into md files, one for each chapter.

The main ideas are:

Note that not all these examples can run, since some take too long. But the good thing is that they are taken from the Oscar source where they are tested. So I think in this way it should be unnecessary to test them here. We could create another Dict for inserting annotations between the examples and also have nicer titles at the top.

What do you think @aaruni96 @HereAround ?

lkastner commented 3 months ago

The design of the script is very human. It could e.g. be adapted to insert the examples in some existing html files if that is what you like better. E.g. you could have

EXAMPLE cornerstones/chapter/something.jlcon

and have the script replace this block with the actual contents of the jlcon file.