Copy_File :: struct { src: string; dest: string; } Markdown_File :: struct { fn: string; content: string; } make_date :: (cal: Calendar_Time) -> string { day := string_pad_left( tprint("%", cal.day_of_month_starting_at_0 + 1), 2, "0" ); month := string_pad_left( tprint("%", cal.month_starting_at_0 + 1), 2, "0" ); return tprint("%1.%2.%3", day, month, cal.year); } template_read_or_exit :: (fp: string, extension := "html") -> string { path := tprint("%/%.%", DIR_TEMPLATES, fp, extension); return file_open_or_exit(path); } file_write_or_exit :: (fp: string, data: string) { ok := write_entire_file(fp, data); if !ok { log_error("Could not write file: %", fp); exit(1); } } file_open_or_exit :: (fp: string) -> string { file, ok := read_entire_file(fp); if !ok { log_error("Could not read file: %", file); exit(1); } return file; }