Skip to content

Commit

Permalink
Add solution prefix to solution upload filename
Browse files Browse the repository at this point in the history
  • Loading branch information
jayqi committed Dec 31, 2024
1 parent 77c3ca3 commit 3e621df
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/upload_puzzle_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ def main(input_file: Path, solution: bool = False, dryrun: bool = False):

calendar_day: int = int(typer.prompt("Calendar day"))
slug: str = typer.prompt("Slug")
output_file_name = f"{calendar_day:02d}-{slug}-{xxh32sum.hexdigest()}.pdf"
if not solution:
output_file_name = f"{calendar_day:02d}-{slug}-{xxh32sum.hexdigest()}.pdf"
else:
output_file_name = f"solution-{calendar_day:02d}-{slug}-{xxh32sum.hexdigest()}.pdf"
print("Output file name:", output_file_name)

if not dryrun:
Expand Down

0 comments on commit 3e621df

Please sign in to comment.