antmicro / tuttest

A simple Python utility for extracting documentation snippets from tutorials.
Apache License 2.0
13 stars 2 forks source link

Add HTML support #7

Open mgielda opened 4 years ago

mgielda commented 4 years ago

Would allow us to test e.g. https://risc-v-getting-started-guide.readthedocs.io/en/latest/zephyr-qemu.html

(although these actually come as scripts so it's perhaps not the best example)

anyhoo, the ability to test arbitrary HTML code snippets would be pretty rad

mgielda commented 4 years ago

We could focus (for now) on how Sphinx renders things. So basically unwrap all spans, and you're done.

Tabs like here: https://risc-v-getting-started-guide.readthedocs.io/en/latest/linux-qemu.html are a difficulty, but if you properly extract the snippets, I don't think it really is.

Also, just came to my mind, in RST, naming the snippets that come in tabs could solve the problem, and the tabbed content is mostly generated anyway.