with open(args.output_file, "w", encoding="utf-8") as f:
for line in asy_output.stdout.splitlines():
stripped_lines = line.strip()
if (
stripped_lines.startswith("Asymptote")
or stripped_lines.startswith("http")
or stripped_lines.startswith("Usage:")
):
continue
f.write(line)
f.write("\n")