AdventOfCodeXXXX/create.py
Luke Else bf2205c257
All checks were successful
Continuous integration / Check (push) Successful in 50s
Continuous integration / Test Suite (push) Successful in 56s
Continuous integration / Rustfmt (push) Successful in 39s
Continuous integration / build (push) Successful in 56s
Created template for advent of code in rust
2024-11-20 22:54:11 +00:00

12 lines
462 B
Python

for day in range(1, 26):
boilerplate = open(".\\src\\solutions\\dayxx.rs", "r").read()
boilerplate = boilerplate.replace("0", str(day))
boilerplate = boilerplate.replace("XX", f"{day:02d}")
new_code = open(f".\\src\\solutions\\day{day:02d}.rs", "w")
new_code.write(boilerplate)
f = open(f".\\src\\input\\day{day:02d}", "x")
f = open(f".\\src\\input\\day{day:02d}_test1", "x")
f = open(f".\\src\\input\\day{day:02d}_test2", "x")