Compare commits

...

6 commits

Author SHA1 Message Date
rottenwheel
087c5a6b17
Merge pull request #74 from recanman/master
chore: update theme
2025-03-21 05:41:37 +00:00
recanman
1104664e97 chore: update theme 2025-03-20 22:40:38 -07:00
rottenwheel
8993003bdd
Merge pull request #73 from recanman/master
fix: replace `table_date` date when creating new issue
2025-03-21 05:25:34 +00:00
recanman
3312ee81bf fix: replace table_date date when creating new issue 2025-03-20 22:24:24 -07:00
rottenwheel
7ac3c3aad3
Merge pull request #72 from recanman/master
fix: replace all dates when creating new issue
2025-03-21 05:17:23 +00:00
recanman
7af6f05f39 fix: replace all dates when creating new issue 2025-03-20 22:15:31 -07:00
2 changed files with 12 additions and 1 deletions

View file

@ -71,10 +71,21 @@ def create_issue(
lines = content.split("\n")
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:"):
lines[i] = f'title: "Issue {issue_number}: {period_string}"'
elif line.startswith("{{% event"): # replace date in event shortcode
lines[i] = line.replace("July 1, 2024", meeting_placeholder)
elif 'date="January 1, 2024"' in line: #replace date in bc_stats shortcode
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)

@ -1 +1 @@
Subproject commit 4ece6d141a63814587d10dc83850851699b9595b
Subproject commit 51f9e9d373186da0f4db1a24d10446a82ba30a90