Skip to content

Commit

Permalink
feat(elmo): Autodetect ELMO max year
Browse files Browse the repository at this point in the history
  • Loading branch information
vEnhance committed Feb 12, 2024
1 parent 99ed2b8 commit 96bc428
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions elmo/assemble.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import datetime
import heapq
import sys

Expand All @@ -9,13 +8,13 @@
BASE = r"file:///home/evan/Sync/www/elmo/"
else:
BASE = r"//web.evanchen.cc/elmo/"
YEAR_NEXT = datetime.datetime.today().year
YEAR_PREV = YEAR_NEXT - 1
YEARS = range(2012, YEAR_NEXT + 1)
with open("internal/prob_links.yaml") as d:
data = yaml.load(d, Loader=yaml.SafeLoader)
PREV_URL = data[YEAR_PREV]["AoPS Thread"]
NEXT_URL = data[YEAR_NEXT]["AoPS Thread"]
YEAR_NEXT = max(data.keys())
YEAR_PREV = YEAR_NEXT - 1
YEARS = range(2012, YEAR_NEXT + 1)
PREV_URL = data[YEAR_PREV]["AoPS Thread"]
NEXT_URL = data[YEAR_NEXT]["AoPS Thread"]

# Create header {{{1
with open("static/header.html") as f:
Expand Down

0 comments on commit 96bc428

Please sign in to comment.