@@ -54,14 +54,14 @@ def get_dict(lang='en'):
54
54
return dic
55
55
56
56
def update_calendar (year , month , day , with_isoweek = False , start_from_Sun = False , lang = "en" ):
57
- # Check if DailyLC .md exists, if not, create one
57
+ # Check if README .md exists, if not, create one
58
58
if not os .path .exists ('DailyLC.md' ):
59
59
with open ('DailyLC.md' , 'w' ) as f :
60
60
print ("The file DailyLC.md does not exist. Creating a new one..." )
61
61
f .write ('## 🎯 Calendar\n \n ## Records\n \n ' )
62
62
63
- # Read the content of DailyLC .md
64
- with open ('DailyLC .md' , 'r' ) as file :
63
+ # Read the content of README .md
64
+ with open ('README .md' , 'r' ) as file :
65
65
content = file .read ()
66
66
67
67
# Extract the part between "## 🎯 Calendar" to the start of the next section "## Records".
@@ -100,13 +100,13 @@ def update_calendar(year, month, day, with_isoweek=False, start_from_Sun=False,
100
100
star_flag = False
101
101
calendar_section_lines [i ] = "|" .join (day_cells )
102
102
103
- # Replace 'Calendar' section in DailyLC .md with the updated section
103
+ # Replace 'Calendar' section in README .md with the updated section
104
104
new_content = re .sub (r"## 🎯 Calendar(.*)(?=## 🍃 Records)" , "\n " .join (calendar_section_lines ), content , flags = re .DOTALL )
105
105
106
- with open ('DailyLC .md' , 'w' ) as file :
106
+ with open ('README .md' , 'w' ) as file :
107
107
file .write (new_content )
108
108
109
- return "Successfully updated Calendar of DailyLC .md"
109
+ return "Successfully updated Calendar of README .md"
110
110
111
111
if __name__ == "__main__" :
112
112
argv = sys .argv
0 commit comments