Solutions to each day, in the following format:
1 # day
├── eg.txt # example input
├── input.txt # actual puzzle input
├── solution.js # contains the puzzle solution
└── todo.txt # puzzle preamble and premise
-
Run
$ npm i
to installdotenv
. -
Run
$ npm start
, you will be prompted for your AoC session token (cookie) to fetch your puzzle inputs. You can also manually write it to the.env
file with the keyAUTH_TOKEN=2343223432...
-
Run
$ npm run fetch <days>
to fetch the desired days, you can fetch many days at once with brace expansion, eg:$ npm run fetch {1..5}
will translate to$ npm run fetch 1 2 3 4 5
-
Run puzzles with
$ node <day>/solution.js
if the coresponding folder existis
$ npm run fetch <days>
or input which days you want to fetch$ npm run delete <days>
or input which days you want to delete, confirm with y
- Parse and download the task exercise as well -> This extension works particularly well
- Add functionality for multiple examples? Array?
- How to get your Auth token
- Log in to the advent of code website, open the inspector got to Cookies. Click on
session
and copy the value.
- Log in to the advent of code website, open the inspector got to Cookies. Click on
My solutions are released under the MIT License. Puzzles and inputs belong to Advent of Code