My solution for Advent of Code problems
- Get your AoC session cookie and put it in a
.env
(session=XXXXX) - Also set your email in
.env
to fill request headers (email=XXXXXX) - Install requirements using
pipenv install
The package will install a typer-based cli named aoc
. You can use it as follow:
aoc prepare 2022
: Will create the directories for each day of year 2022 using the template inyear_template
.aoc download 1 2022
: Will download the input for problem 1 of year 2022 (NB: You need to runprepare_year
first).aoc run 1 2022
: Will run thesolution.py
file for problem 1 of year 2022.aoc submit 3 1 2022
: Will submit solution for part 1 of day 3 of year 2022.aoc get-stars
to update the README badges.
By default, day
and year
values are the current day and year. Run aoc --help
for more details
- When data become available, run
aoc download
. - Implement your solution in the
solve_part_1
andsolve_part_2
functions. - Use
aoc submit
to submit any part once you are satisfied with it. You'll get any error message from AoC in the terminal.