Update year references for Advent of Code entries
This commit is contained in:
@@ -23,8 +23,8 @@ notebooks = {
|
||||
'How many electoral votes would Trump get if he wins the state where he has positive net approval?')],
|
||||
|
||||
'Advent of Code': [
|
||||
('Advent of Code 2025: AI LLM Edition', 2024, 'Advent-2025-AI.ipynb', 'Using large language coding models to solve AoC puzzles'),
|
||||
('Advent of Code 2025', 2024, 'Advent-2025.ipynb', 'Puzzle site with a coding puzzle for 12 days of Christmas, December 2025'),
|
||||
('Advent of Code 2025: AI LLM Edition', 2025, 'Advent-2025-AI.ipynb', 'Using large language coding models to solve AoC puzzles'),
|
||||
('Advent of Code 2025', 2025, 'Advent-2025.ipynb', 'Puzzle site with a coding puzzle for 12 days of Christmas, December 2025'),
|
||||
('Advent of Code 2024', 2024, 'Advent-2024.ipynb', 'Puzzle site with a coding puzzle each day of Advent, December 2024'),
|
||||
('Advent of Code 2023', 2023, 'Advent-2023.ipynb', 'Puzzle site with a coding puzzle each day of Advent, December 2023'),
|
||||
('Advent of Code 2022', 2022, 'Advent-2022.ipynb', 'Puzzle site with a coding puzzle each day of Advent, December 2022'),
|
||||
@@ -143,6 +143,7 @@ import re
|
||||
import urllib.request
|
||||
|
||||
current_year = 2026
|
||||
new_year = current_year - 2 # What `find_newest` looks for
|
||||
|
||||
def read_url(url: str) -> str:
|
||||
"""Reads a file from the specified URL and returns its content as a string."""
|
||||
@@ -178,7 +179,7 @@ def format_notebooks() -> str:
|
||||
find_newest(notebooks)
|
||||
return '\n'.join(format_category(name) for name in notebooks)
|
||||
|
||||
def find_newest(notebooks, label='New', year=current_year-1) -> None:
|
||||
def find_newest(notebooks, label='New', year=new_year) -> None:
|
||||
"""Mutate `notebooks['New']` to have a collection of newest notebooks."""
|
||||
for category in notebooks:
|
||||
for line in notebooks[category]:
|
||||
|
||||
Reference in New Issue
Block a user