diff --git a/cmd.txt b/cmd.txt index cc01dcb..c02ed90 100644 --- a/cmd.txt +++ b/cmd.txt @@ -1 +1,3 @@ +. .venv/bin/activate +export PYTHONPATH=${PYTHONPATH:-$(realpath lib)} command cd "$(./get_input.sh)" && less input diff --git a/get_input.sh b/get_input.sh index 6c63bc5..f4f74ec 100755 --- a/get_input.sh +++ b/get_input.sh @@ -5,6 +5,7 @@ cd "$(dirname $(realpath $0))" . .env d=$(date +%d) +e=$(bc <<< "$d + 0") mkdir -p d${d} cd d${d} @@ -16,6 +17,6 @@ cd d${d} -H 'Connection: close' \ -H "Cookie: session=$SESSION" \ -o input \ - "https://adventofcode.com/2024/day/$(( $d + 0 ))/input" + "https://adventofcode.com/2024/day/$e/input" echo $(realpath .)