A Python framework for solving Advent of Code puzzles with automatic project structure generation and file management. This repo may inherit some functions from my previous Advent of Code.
- Improved automatic directory and file creation
- Organized structure by year and day
- Simple command-line interface
- Sample input support for testing
- Pre-configured solution templates
Clone and initialize:
git clone https://github.com/Vasile-Hij/advent_of_code_puzzle
cd advent-of-code-solver
make initBasic commands:
make up
python main.py -id 2501 -p a # 2501 -> YYDD, a -> part a
python main.py -id 2501 -p b # 2501 -> YYDD, a -> part b
python main.py -id 2501 -p a -s s # 2501 -> YYDD, a -> part a with sample input
python main.py -id 2501 -r 1 # auto run both parts and dump results to JSON
make downmake help # Show all commands
make install-uv # Install uv package manager
make setup # Initialize project
make up # Activate virtual environment
make down # Deactivate virtual environment
make lock # Update dependencies
make init # Full initialization
make lint # Highlights semantic and stylistic issue
make pyright # Static type checker
make test # Run lint + pyright at onceRunning python main.py -id 2501 -p a -s s it will create and populate a script file in 25 directory
with script file 1.py. Also it will create a sample file in input directory named 1_sample_a.txt.
If running without a sample will also create a new input file named 1.txt