File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 16
16
# Get the current date
17
17
today = datetime .today ()
18
18
day_of_month = today .strftime ("%d" ) # Get current day of the month
19
- month = today .strftime ("%b " ) # Get current month (e.g., Nov )
19
+ month = today .strftime ("%B " ) # Get current full month name (e.g., November )
20
20
21
- # Format the solution file name for today (e.g., 07 (Nov)Next Problem .md)
22
- today_solution_filename = f"{ day_of_month } ({ month } ){ today .strftime ('%A' )} .md"
21
+ # Format the solution file name for today (e.g., 06 (Nov)Root to leaf paths sum .md)
22
+ today_solution_filename = f"{ day_of_month } ({ today . strftime ( '%b' ) } ){ today .strftime ('%A' )} .md"
23
23
24
24
# Prepare the badge URL and commit link to update README
25
25
badge_url = "https://img.shields.io/badge/GeeksforGeeks-Solution%20of%20the%20Day-blue"
29
29
with open (readme_path , "r" ) as readme :
30
30
content = readme .read ()
31
31
32
- # Update today's solution link
32
+ # Update today's solution link in the README
33
33
content = re .sub (
34
34
r"(?<=<!--START_SECTION:latest-commit-->).*?(?=<!--END_SECTION:latest-commit-->)" ,
35
35
f"\n https://github.com/{ repository } /blob/main/{ month } %202024%20GFG%20SOLUTION/{ today_solution_filename } \n " ,
36
36
content ,
37
37
flags = re .DOTALL
38
38
)
39
39
40
- # Update badge link
40
+ # Update the badge link
41
41
content = re .sub (
42
42
r"(?<=<!--START_SECTION:potd-badge-->).*?(?=<!--END_SECTION:potd-badge-->)" ,
43
43
f"\n { badge_link } \n " ,
You can’t perform that action at this time.
0 commit comments