Add scripts to fetch single or calendar inputs
This commit is contained in:
parent
fb5a1b9381
commit
afeae6623d
2 changed files with 17 additions and 0 deletions
8
fetch-calendar
Executable file
8
fetch-calendar
Executable file
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
for i in $(seq 1 25)
|
||||||
|
do
|
||||||
|
./fetch-input $1 $i $2
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
9
fetch-input
Executable file
9
fetch-input
Executable file
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
OUTPUT=$3/$(seq -f "%02g" $2 $2).txt
|
||||||
|
|
||||||
|
curl \
|
||||||
|
-o $OUTPUT \
|
||||||
|
"https://adventofcode.com/$1/day/$2/input" \
|
||||||
|
--compressed \
|
||||||
|
-H "Cookie: session=$AOCTOKEN" \
|
||||||
Loading…
Add table
Reference in a new issue