repository
0.0.0-20241204022932-753044af84db
Repository: https://github.com/clhilgert/advent2024.git
Documentation: pkg.go.dev
# README
🎄 🎁 Advent of Code 2024 🎁 🎄
Advent of Code is an annual event that runs during the first 25 days of December. Each day, a new programming puzzle is released on the Advent of Code website. The puzzles typically involve problems related to algorithms, data structures, and computational thinking.
This repository contains my solutions to the Advent of Code 2024 challenges, written in Go. I'll be updating this repo daily with new solutions as the puzzles are released.
AOC cli Tool
Additionally, this repo includes a CLI tool that can be used to easily fetch each day's input.
Flags:
- -n (int, required): Day number (1-25)
- -y (int, optional): Year (default 2024)
- -o (string, optional): Output filename (default 'input.txt')
- --dir (string, optional): Output directory (default: day01 - day25, based on -n flag)
Examples/Usage:
The SESSION_COOKIE
environment variable must be set, either in the shell or in a .env file.
- Day 1 default
aoc -n 1
day01/input.txt
- Day 1 of 2023 with custom filename, output to current working directory
aoc -n 1 -y 2023 -o file.txt --dir .
file.txt
Installation
Clone this repository
git clone [email protected]:clhilgert/advent2024.git
cd advent2024
Build binary
make build
Create ~/bin/ if it doesn't already exist and add to PATH
mkdir -p ~/bin
mv target/aoc ~/bin/
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc