diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rwxr-xr-x | bin/get-input | 7 |
2 files changed, 8 insertions, 0 deletions
@@ -1 +1,2 @@ /target +/.cookie diff --git a/bin/get-input b/bin/get-input new file mode 100755 index 0000000..da76600 --- /dev/null +++ b/bin/get-input @@ -0,0 +1,7 @@ +#!/bin/sh + +day=${1:-$(date +%-d)} +year=${2:-$(date +%Y)} + +mkdir -p data/"$year" +curl -b "$(cat .cookie)" -s https://adventofcode.com/"$year"/day/"$day"/input >data/"$year"/"$day".txt |