Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 1.34 KB

arbitrary-python.mkd

File metadata and controls

45 lines (31 loc) · 1.34 KB

This is an example of genhtml-markdown usage

Look at the following bold statement:

print("<b> I'm bold  ! </b>")

You should know that i didn't wrote it as-is. I wrote it with python, with the following markdown syntax:

```genhtml
print("<b> I'm bold  ! </b>")
```

You have access to the whole language, of course:

	print('-'.join(map(str, range(0, 999999, 42))))

And, also, to installed packages !

data = go.Scatter(x=[1, 2, 3, 4], y=[4, 3, 2, 1])
layout = go.Layout(title="hello world")

This last view was generated with the following code, where some boilerplate code for plotting was added at the end (footer):

```genhtml footer=plot
data = go.Scatter(x=[1, 2, 3, 4], y=[4, 3, 2, 1])
layout = go.Layout(title="hello world")
```

Note that many imports are done by default. We can see that by using the interpret=false parameter, allowing us to get the full code instead of its interpretation:

data = go.Scatter(x=[1, 2, 3, 4], y=[4, 3, 2, 1])
layout = go.Layout(title="hello world")

Now, you can install genhtml-markdown, define your own headers and footers, and take over the world !

What a time to be alive !