Skip to content

Commit

Permalink
language filter
Browse files Browse the repository at this point in the history
  • Loading branch information
rene-d committed Feb 2, 2024
1 parent 6c3b886 commit 5c21353
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions scripts/runall.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@

LANGUAGES = {
"Python": "{year}/day{day}/day{day}.py",
# "PyPy": "{year}/day{day}/day{day}.py",
"PyPy": "{year}/day{day}/day{day}.py",
"Rust": "{year}/target/release/day{day}",
"C": "{year}/build/day{day}_c",
"C++": "{year}/build/day{day}_cpp",
}

DEFAULT_LANGUAGES = {"Python", "Rust"}

INTERPRETERS = {
"Python": "python3",
"PyPy": "pypy3",
Expand Down Expand Up @@ -258,7 +260,12 @@ def run_day(
results = set()

for lang, pattern in LANGUAGES.items():
if filter_lang and lang.lower() != filter_lang.lower():
if filter_lang == "all":
pass
elif filter_lang:
if lang.lower() != filter_lang.lower():
continue
elif lang not in DEFAULT_LANGUAGES:
continue

prog = Path(pattern.format(year=year, day=mday))
Expand Down

0 comments on commit 5c21353

Please sign in to comment.