AdventOfCode/2020/new.py

22 lines
319 B
Python
Raw Normal View History

2020-12-02 13:54:18 +01:00
#!/usr/bin/env python3
import os
from datetime import date
2020-12-06 17:01:34 +01:00
TEMPLATE = """\
2020-12-09 13:36:43 +01:00
import sys
2020-12-02 13:54:18 +01:00
def main():
2020-12-09 13:36:43 +01:00
lines = [line.rstrip() for line in sys.stdin]
2020-12-02 13:54:18 +01:00
if __name__ == "__main__":
main()
"""
day = date.today().day
with open(f"day{day}.py", "wt") as f:
2020-12-09 13:36:43 +01:00
f.write(TEMPLATE)
2020-12-02 13:54:18 +01:00
os.system(f"python ../fetch.py {day}")