aboutsummaryrefslogtreecommitdiff
path: root/aocd
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-11-29 13:44:34 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2025-11-29 13:44:34 +0100
commit3b21e702c44d8f721e9ced997c417481f2c273ca (patch)
tree7423e230e1e9715e469b5a9a53259d74eb081bee /aocd
parent3fe83c0f2f7e6e3d87ede77607cca5922fa02a60 (diff)
downloadscripts-3b21e702c44d8f721e9ced997c417481f2c273ca.tar.gz
scripts-3b21e702c44d8f721e9ced997c417481f2c273ca.zip
Improved aoc script (was aocd)
Diffstat (limited to '')
-rwxr-xr-xaocd13
1 files changed, 0 insertions, 13 deletions
diff --git a/aocd b/aocd
deleted file mode 100755
index cab4060..0000000
--- a/aocd
+++ /dev/null
@@ -1,13 +0,0 @@
1#!/bin/sh
2
3# Download input from the Advent of Code website (https://adventofcode.com/).
4# Requires setting an AOC_SESSION_COOKIE variable with a valid session cookie.
5
6# usage: aocd [year n]
7# If year and n are not specified, the current year and day are used.
8
9YEAR="${1:-$(date +'%Y')}"
10DAY="${2:-$(date +'%d' | sed 's/^0//')}"
11URL="https://adventofcode.com/$YEAR/day/$DAY/input"
12
13curl "$URL" -H "cookie: session=$AOC_SESSION_COOKIE" -o input.txt

Generated with cgit - Back to sebastiano.tronto.net