-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnew.sh
More file actions
executable file
·45 lines (31 loc) · 729 Bytes
/
new.sh
File metadata and controls
executable file
·45 lines (31 loc) · 729 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
date=$(date +'%a, %e %b')
day=$(date +'%e')
file="$(date +'%d').py"
template="\"\"\"${date}\"\"\"
from puzzles import get_puzzle
PUZZLE = get_puzzle(${day##* })
EXAMPLE = [
]
def test_one():
\"\"\"Test Part One\"\"\"
assert one(EXAMPLE) == False
def test_two():
\"\"\"Test Part Two\"\"\"
assert two(EXAMPLE) == False
def one(puzzle: list):
\"\"\"Part One\"\"\"
return NotImplemented
def two(puzzle: list):
\"\"\"Part Two\"\"\"
return NotImplemented
if __name__ == \"__main__\":
test_one()
print(\"1:\", one(PUZZLE))
test_two()
print(\"2:\", two(PUZZLE))"
if ! [[ -e "${file}" ]]; then
echo "${template}" > "${file}"
else
echo "${file} exists."
fi