mirror of
https://github.com/rottenwheel/revuo-weekly.git
synced 2025-04-29 14:19:26 -04:00
Compare commits
6 commits
a1e29457dc
...
087c5a6b17
Author | SHA1 | Date | |
---|---|---|---|
|
087c5a6b17 | ||
|
1104664e97 | ||
|
8993003bdd | ||
|
3312ee81bf | ||
|
7ac3c3aad3 | ||
|
7af6f05f39 |
2 changed files with 12 additions and 1 deletions
11
new_issue.py
11
new_issue.py
|
@ -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
|
Loading…
Add table
Reference in a new issue