removed sensitive info

master
Chris Nutter 2025-01-09 19:44:13 -08:00
parent a2dfc18358
commit 8466b9acbc
1 changed files with 11 additions and 6 deletions

17
app.py
View File

@ -95,13 +95,18 @@ END:VCALENDAR
# Usage example # Usage example
if __name__ == "__main__": if __name__ == "__main__":
if len(sys.argv) != 5:
print("Usage: python3 app.py <caldav_url> <username> <password> <ra_api_key>")
sys.exit(1)
CALDAV_URL = sys.argv[1]
USERNAME = sys.argv[2]
PASSWORD = sys.argv[3]
RA_API = sys.argv[4]
# CalDAV server details # CalDAV server details
CALDAV_URL = "https://cal.cdnutter.org/dav.php/calendars/cdnutter/qesvjipbzdtcahrz/" JSON = f"https://retroachievements.org/API/API_GetAchievementOfTheWeek.php?&y={RA_API}"
USERNAME = "cdnutter"
PASSWORD = "ZRGiXtDHP3jvXq0d"
JSON_FILE = "https://retroachievements.org/API/API_GetAchievementOfTheWeek.php?&y=oHdON3RERFPnHV1J6Oiax5F85Wkh5Msq"
response = requests.get(JSON_FILE) response = requests.get(JSON_FILE)
data = response.json() data = response.json()
create_calendar_events_from_json(CALDAV_URL, USERNAME, PASSWORD, JSON_FILE) create_calendar_events_from_json(CALDAV_URL, USERNAME, PASSWORD, JSON)