Phoenix template render and save as file

Hi,

I am looking for a way to render a template (called from a liveview controller) and save it as an html file. The file will then be processed by another program.

Something in the form

socket
|> process_input()
|> render_and_save("template.html", assigns)
|> redirect(to: blubb, bar)

But of course, this rendered template shall not be the response.

I have used EEx.eval_file/3 for rendering the html template. It doesn’t support inline/recursive rendering though.