Library used for data: https://github.com/wimglenn/advent-of-code-data.
Main things:
- Fetch your token (help)
- Save the value in
~/.config/aocd/token
# Today's data
aocd > in.txt
# Data of a specific puzzle
aocd 3 2020 > in.txt
There's a script to start a new day:
./new_day.sh $day_number
Running the script will create a new folder with the template files for a Python solution
under python/<day_number>
.
- Go to the directory of the day you want to run (e.g.
cd python/04
) - Run
python sol.py
to run the solution against your individual input - ... or run
python sol.py X
to run the solution against the input stored in the filesX.txt
in the same directory
Shortcut for starting a day:
./new_day.sh X && cd python/XX && code sol.py