fix: replace table_date date when creating new issue

This commit is contained in:
recanman 2025-03-20 22:24:24 -07:00
parent 7ac3c3aad3
commit 3312ee81bf

View File

@ -73,6 +73,7 @@ def create_issue(
period_string = get_period_string(period_start, period_end, True)
meeting_placeholder = f"{period_start.strftime("%B")} [day], {period_start.year}"
data_placeholder = period_end.strftime("%B %-d, %Y")
tabledata_placeholder = period_end.strftime("%m/%d/%y")
for i, line in enumerate(lines):
if line.startswith("title:"):
@ -83,6 +84,8 @@ def create_issue(
lines[i] = line.replace("January 1, 2024", data_placeholder)
elif 'date="June 6, 2024"' in line: #replace date in price_performance shortcode
lines[i] = line.replace("June 6, 2024", data_placeholder)
elif 'table_date="06/13/24"' in line: #replace table_date in price_performance shortcode
lines[i] = line.replace("06/13/24", tabledata_placeholder)
content = "\n".join(lines)