summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/get-input7
1 files changed, 7 insertions, 0 deletions
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