generated from public/aoc_template
Compare commits
2 Commits
08c88b5df6
...
9b11bec788
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b11bec788 | |||
| 448133da2c |
@ -12,6 +12,6 @@ repos:
|
|||||||
args:
|
args:
|
||||||
- --auto-add-tiles-to-git=add
|
- --auto-add-tiles-to-git=add
|
||||||
- --contrast-improvement-type=dark
|
- --contrast-improvement-type=dark
|
||||||
- --overwrite-year=2024
|
- --overwrite-year=2025
|
||||||
# - --language-sorting=py,jl,kt,rs
|
# - --language-sorting=py,jl,kt,rs
|
||||||
# - --exclude-patterns=2021/*/*.apl,2021/*/*.py,2021/*/*.cpp
|
# - --exclude-patterns=2021/*/*.apl,2021/*/*.py,2021/*/*.cpp
|
||||||
28
README.md
28
README.md
@ -1,29 +1,5 @@
|
|||||||
# aoc_template
|
# Advent Of Code 2025
|
||||||
|
|
||||||
Template for yearly AoC-Repositories
|
|
||||||
|
|
||||||
# Usage
|
|
||||||
|
|
||||||
- Clone repository (or use as template in gitea)
|
|
||||||
- Run `pip install -r requirements.txt`
|
|
||||||
- Update main.py and start_day.py: set YEAR (near the top) to the respective year
|
|
||||||
- Create a file named ".session" next to your main.py containing the contents of your aoc-session cookie
|
|
||||||
|
|
||||||
On a given day, just call `./start_day.py -d <day_of_month>`
|
|
||||||
|
|
||||||
# Not using PyCharm?
|
|
||||||
|
|
||||||
Just comment out the call() to CHARMS near the end of start_day.py
|
|
||||||
|
|
||||||
# Want to add AoC-Tiles?
|
|
||||||
|
|
||||||
Author: https://github.com/LiquidFun/aoc_tiles
|
|
||||||
|
|
||||||
- Run `pre-commit install --hook-type post-commit`
|
|
||||||
- In .pre-commit-config.yaml change the --overwrite-year option as needed
|
|
||||||
- Optional: Copy your .session file to session.cookie
|
|
||||||
- For more options see: https://github.com/LiquidFun/aoc_tiles/blob/main/aoc_tiles/config.py
|
|
||||||
|
|
||||||
Tiles will be added to this README between the following lines:
|
|
||||||
<!-- AOC TILES BEGIN -->
|
<!-- AOC TILES BEGIN -->
|
||||||
|
|
||||||
<!-- AOC TILES END -->
|
<!-- AOC TILES END -->
|
||||||
2
main.py
2
main.py
@ -5,7 +5,7 @@ import argparse
|
|||||||
import importlib
|
import importlib
|
||||||
import os
|
import os
|
||||||
|
|
||||||
YEAR = 2018
|
YEAR = 2025
|
||||||
TIMEIT_NUMBER = 50
|
TIMEIT_NUMBER = 50
|
||||||
|
|
||||||
argument_parser = argparse.ArgumentParser()
|
argument_parser = argparse.ArgumentParser()
|
||||||
|
|||||||
4
start_day.py
Normal file → Executable file
4
start_day.py
Normal file → Executable file
@ -9,7 +9,7 @@ from tools.tools import human_readable_time_from_delta
|
|||||||
import webbrowser
|
import webbrowser
|
||||||
|
|
||||||
|
|
||||||
YEAR = 2018
|
YEAR = 2025
|
||||||
CHARMS = {
|
CHARMS = {
|
||||||
'Linux': '/usr/local/bin/charm',
|
'Linux': '/usr/local/bin/charm',
|
||||||
'Windows': r'C:\Users\pennywise\AppData\Local\JetBrains\Toolbox\scripts\pycharm.cmd'
|
'Windows': r'C:\Users\pennywise\AppData\Local\JetBrains\Toolbox\scripts\pycharm.cmd'
|
||||||
@ -21,7 +21,7 @@ args = arg_parser.parse_args()
|
|||||||
|
|
||||||
DAY = args.day or datetime.now().day
|
DAY = args.day or datetime.now().day
|
||||||
|
|
||||||
if YEAR < 2015 or not 1 <= DAY <= 25:
|
if YEAR < 2015 or not 1 <= DAY <= 12:
|
||||||
print("Invalid year or day for year: %d, day: %d" % (YEAR, DAY))
|
print("Invalid year or day for year: %d, day: %d" % (YEAR, DAY))
|
||||||
exit()
|
exit()
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user