Add spotify renderer
This commit is contained in:
parent
16fd5b0b95
commit
b55c3a666f
17 changed files with 1464 additions and 22 deletions
|
@ -116,7 +116,7 @@ pub fn render(self: *const Self, efa_dm_resp: *const api.efa.models.DmResponse,
|
|||
const escaped_context = try context.escape(arena.allocator());
|
||||
|
||||
var tmp_file = try temp.TempFile.create(arena.allocator(), .{
|
||||
.pattern = "departures-*.html",
|
||||
.pattern = "render-departures-*.html",
|
||||
});
|
||||
defer tmp_file.deinit();
|
||||
const path = try tmp_file.parent_dir.realpathAlloc(arena.allocator(), tmp_file.basename);
|
||||
|
@ -124,7 +124,7 @@ pub fn render(self: *const Self, efa_dm_resp: *const api.efa.models.DmResponse,
|
|||
const file = try tmp_file.open(.{ .mode = .write_only });
|
||||
defer file.close();
|
||||
const writer = file.writer();
|
||||
try template.render(&escaped_context, writer);
|
||||
try template.render(&escaped_context, writer.any());
|
||||
}
|
||||
|
||||
return try renderer.render(self.allocator, path, self.dimensions);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue