Fix calendar URL is entered just once

This commit is contained in:
Dejvino 2026-02-01 20:34:28 +01:00
parent 6f5d744628
commit 042df5efc2

View File

@ -20,18 +20,21 @@ class TasksJob(Job):
return "UKOLY DNE"
def configure(self):
print("\n--- Configure Calendar URL ---")
print("To find your Google Calendar URL:")
print("1. Go to Settings > Select Calendar > Integrate calendar")
print("2. Copy 'Secret address in iCal format'")
print("-" * 30)
print("Enter the public or secret address in iCal format (.ics).")
print("Example: https://calendar.google.com/calendar/ical/.../basic.ics")
url = input("URL: ").strip()
if url:
with open('calendar_url.txt', 'w') as f:
f.write(url)
print("URL saved.")
if not os.path.exists('calendar_url.txt'):
print("\n--- Configure Calendar URL ---")
print("To find your Google Calendar URL:")
print("1. Go to Settings > Select Calendar > Integrate calendar")
print("2. Copy 'Secret address in iCal format'")
print("-" * 30)
print("Enter the public or secret address in iCal format (.ics).")
print("Example: https://calendar.google.com/calendar/ical/.../basic.ics")
url = input("URL: ").strip()
if url:
with open('calendar_url.txt', 'w') as f:
f.write(url)
print("URL saved.")
else:
print("\nCalendar URL is already configured (delete calendar_url.txt to reset).")
print("-" * 30)
try: