diff --git a/fetch-calendar b/fetch-calendar new file mode 100755 index 0000000..adb0202 --- /dev/null +++ b/fetch-calendar @@ -0,0 +1,8 @@ +#!/bin/bash + +for i in $(seq 1 25) +do + ./fetch-input $1 $i $2 +done + + diff --git a/fetch-input b/fetch-input new file mode 100755 index 0000000..791c53d --- /dev/null +++ b/fetch-input @@ -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" \