From 968b219616af87b9bacc25c895dfc4660d706ff8 Mon Sep 17 00:00:00 2001 From: mtrx Date: Sun, 8 Dec 2024 22:54:00 +0100 Subject: [PATCH] easy dl input --- .gitignore | 3 ++- load-todays-input.bash | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 load-todays-input.bash diff --git a/.gitignore b/.gitignore index a080af6..5bb1ebc 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -inputs/ \ No newline at end of file +input/ +.sessioncookie \ No newline at end of file diff --git a/load-todays-input.bash b/load-todays-input.bash new file mode 100644 index 0000000..45a08cd --- /dev/null +++ b/load-todays-input.bash @@ -0,0 +1,5 @@ +day=$(date +%-e) +day_zero=$(date +%0e) +session=$(cat .sessioncookie) +mkdir -p input +curl -b "session=${session}" -o "./input/${day_zero}.txt" "https://adventofcode.com/2024/day/${day}/input" \ No newline at end of file