default the output file name

This commit is contained in:
josh committed 2026-11-01 16:05:50 -05:00
1 parent 68d5b39cfd
commit d7394027b1
1 file changed
+14
+14
View File
@@ -7,5 +7,19 @@ Engine::Engine(const RenderParams & params)
int Engine::run(string_view input_file, opt<string_view> output_file)
{
string output_path;
if (output_file)
{
output_path = *output_file;
}
else
{
string_view base = input_file;
if (base.ends_with(".fart"))
{
base.remove_suffix(5u);
}
output_path = string(base) + ".png";
}
return 0;
}