Fetches Advent of Code puzzle inputs and prints to standard out.
Install with go >= 1.17
go install github.com/al-ce/aocgofetch@latest
Or clone this repository and build with go build -o <path-to-binary>
.
This project uses joho/gotodenv as a dependency.
Authenticate yourself at adventofcode.com
and get the value for the session
cookie from your browser.
- Firefox:
Developer Tools > Storage > Cookies
- Chrome:
Developer Tools > Application > Cookies
Add that value to an AOC_SESSION
key to a .env
file at the root of your working directory, like your directory where you're writing your puzzle-solvers.
AOC_SESSION="yourCookieValue"
WARNING: make sure you add the .env
to your .gitignore
if you're backing up your files to a remote repository!
Reminder: please respect the author and do not include the puzzle text or the puzzle input in your repository.
Give the year (2015-present) and day (1-25) as arguments.
The puzzle input will print to stdout
:
❯ aocgofetch 2015 4
ckczppom