This commit is contained in:
2025-11-26 15:47:32 -05:00
commit 3d449572c0
4 changed files with 43 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
.cookie
*/inputs

3
readme.md Normal file
View File

@@ -0,0 +1,3 @@
# AOC 2025
<https://adventofcode.com/2025/>

17
run.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
__year=2024
__day="${1}"
if [ -z "${__day}" ]; then
__day=$(date '+%d')
fi
padded=$(printf "%02g" ${__day})
if [ -f "${padded}/index.ts" ]; then
cd $padded
npx tsx "index.ts" 2>/dev/null
cd - >/dev/null
else
echo "day not found"
fi

21
today.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
__year=2024
__day="${1}"
if [ "${__day}" == "" ]; then
__day=$(date '+%d')
fi
padded=$(printf "%02g" ${__day})
mkdir -p ${padded}/inputs
touch ${padded}/inputs/testinput
if [ ! -f "${padded}/inputs/input" ]; then
curl -s \
-A "https://git.yetaga.in/alazyreader/AdventOfCode${__year}/" \
-H "Cookie: session=`cat .cookie`" https://adventofcode.com/${__year}/day/${__day##0}/input > "${padded}/inputs/input"
fi
if [ ! -f "${padded}/index.ts" ]; then
cp index.ts.tmpl ${padded}/index.ts
fi
open "https://adventofcode.com/${__year}/day/${__day##0}"