Add exporting directly to a file

This commit is contained in:
Thelonius Kort
2023-01-23 14:30:25 +01:00
parent f0c178cf31
commit bec0e0ae5c

View File

@ -56,8 +56,10 @@ defmodule Outlook.InternalTree do
end
def legacy_export(tree, translation) do
Translation.render_translation(tree, translation)
content= Translation.render_translation(tree, translation)
|> garnish(%{tunits: %{class: "ttrans", "data-ttrans-status": fn n -> Map.get(n, :status) end}})
|> Html.render_doc
IO.puts "writing export.html to #{File.cwd!}"
File.write("export.html", content)
end
end