Michel Roux
28b2091182
All checks were successful
continuous-integration/drone/push Build is passing
17 lines
376 B
Python
17 lines
376 B
Python
import asyncio
|
|
import functools
|
|
|
|
|
|
def executor(f):
|
|
@functools.wraps(f)
|
|
async def wrapped(*args, **kwargs):
|
|
return await asyncio.get_running_loop().run_in_executor(
|
|
None, lambda: f(*args, **kwargs)
|
|
)
|
|
|
|
return wrapped
|
|
|
|
|
|
def generate_title_html(title, content):
|
|
return f"<h1 style='text-align:center;margin:4rem'>{title}</h1>{content}"
|