Fix calendar URL is entered just once
This commit is contained in:
parent
6f5d744628
commit
042df5efc2
@ -20,6 +20,7 @@ class TasksJob(Job):
|
|||||||
return "UKOLY DNE"
|
return "UKOLY DNE"
|
||||||
|
|
||||||
def configure(self):
|
def configure(self):
|
||||||
|
if not os.path.exists('calendar_url.txt'):
|
||||||
print("\n--- Configure Calendar URL ---")
|
print("\n--- Configure Calendar URL ---")
|
||||||
print("To find your Google Calendar URL:")
|
print("To find your Google Calendar URL:")
|
||||||
print("1. Go to Settings > Select Calendar > Integrate calendar")
|
print("1. Go to Settings > Select Calendar > Integrate calendar")
|
||||||
@ -32,6 +33,8 @@ class TasksJob(Job):
|
|||||||
with open('calendar_url.txt', 'w') as f:
|
with open('calendar_url.txt', 'w') as f:
|
||||||
f.write(url)
|
f.write(url)
|
||||||
print("URL saved.")
|
print("URL saved.")
|
||||||
|
else:
|
||||||
|
print("\nCalendar URL is already configured (delete calendar_url.txt to reset).")
|
||||||
|
|
||||||
print("-" * 30)
|
print("-" * 30)
|
||||||
try:
|
try:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user