output date string as well

This commit is contained in:
Mike Grimes
2022-10-21 10:03:51 -06:00
parent 4afc3e4be9
commit 461d331666
2 changed files with 8 additions and 5 deletions
+2 -2
View File
@@ -113,9 +113,9 @@ s32 is_drumstick_unlocked(void) {
}
```
<!-- README_SCORE_BEGIN -->
As of October 3rd, 2022, this is our current score:
```
<!-- README_SCORE_BEGIN -->
==========================================
ADVENTURE ONE (ASM -> C Decompilation)
------------ 33.19% Complete -------------
@@ -139,8 +139,8 @@ As of October 3rd, 2022, this is our current score:
------------------------------------------
We are racing in Ancient Lake. (Lap 1/3)
==========================================
<!-- README_SCORE_END -->
```
<!-- README_SCORE_END -->
---
+6 -3
View File
@@ -5,12 +5,15 @@ if [[ $1 == '--update-readme' ]]; then
import sys
import os
import re
BEGIN='<!-- README_SCORE_BEGIN -->'
END='<!-- README_SCORE_END -->'
from datetime import datetime
BEGIN = '<!-- README_SCORE_BEGIN -->'
END = '<!-- README_SCORE_END -->'
DATE_STR = datetime.now().strftime('As of %B %-d, %Y, this is our current score:')
print(
re.sub(
fr'(?s).{BEGIN}.*{END}',
f'\n{BEGIN}\n{os.environ["NEW_SCORE"]}\n{END}',
f'\n{BEGIN}\n{DATE_STR}\n```\n{os.environ["NEW_SCORE"]}\n```\n{END}',
open('README.md', 'r').read()
)
)