2023-06-14 15:57:12 +00:00
|
|
|
|
|
|
|
|
2023-09-05 15:50:38 +00:00
|
|
|
"""
|
|
|
|
Using notification logic from timers.py to notify at specified time
|
|
|
|
have web app to access list of reminders? (notion api?)
|
|
|
|
|
|
|
|
look into location based reminders and see if thats possible (maybe ntfy.sh supports this?)
|
2023-09-05 18:37:21 +00:00
|
|
|
|
|
|
|
Look into using ios reminders url scheme to add reminder to ios reminders app - send url to ios device using ntfy.sh
|
|
|
|
|
|
|
|
Even better, use this library: https://github.com/picklepete/pyicloud/blob/master/pyicloud/services/reminders.py
|
|
|
|
(icloud reminders api, reads/writes reminders from/to ios reminders app)
|
2023-09-05 15:50:38 +00:00
|
|
|
"""
|
|
|
|
|
2023-09-14 14:34:27 +00:00
|
|
|
from skills.skill import Skill
|
|
|
|
# from skill import Skill
|
2023-09-12 00:44:56 +00:00
|
|
|
|
2023-09-05 18:37:21 +00:00
|
|
|
|
|
|
|
class Reminders(Skill): # ntfy.sh notification?
|
2023-06-14 15:57:12 +00:00
|
|
|
def __init__(self):
|
2023-09-06 15:39:44 +00:00
|
|
|
self.trigger_phrase = "reminders"
|
|
|
|
|
|
|
|
def get_reminders(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def new_reminder(self, query):
|
|
|
|
pass
|
|
|
|
# Call this to add new reminder, this calls
|
|
|
|
# _add_reminder, parse_reminder_query, and _parse_location or _parse_time if needed
|
|
|
|
|
|
|
|
def _add_reminder(self, text, time=None, location=None, leave=False):
|
|
|
|
"""
|
|
|
|
Text : reminder text
|
|
|
|
Time : Time/date to remind
|
|
|
|
Location : Location to remind
|
|
|
|
Leave : true/false, if location is not None, this decides if the reminder is upon arrival or departure of location
|
|
|
|
"""
|
|
|
|
pass
|
|
|
|
|
|
|
|
def parse_reminder_query(self, query):
|
|
|
|
pass
|
|
|
|
#TODO: Take sentence like "remind me at 5pm tomorrow to walk the dog" and parse out 5pm tomorrow and walk the dog
|
|
|
|
#TODO: Or "remind me when I leave my current location to not forget my keys" and parse out "leave current location" and "not forget my keys"
|
|
|
|
|
|
|
|
|
|
|
|
def _parse_location(self, location_text):
|
|
|
|
pass #Convert verbal location into standardized format
|
|
|
|
|
|
|
|
def _parse_time(self, time_text):
|
2023-09-14 14:34:27 +00:00
|
|
|
pass #Convert time into standardized format
|
|
|
|
#use parsetime6 from utility.py
|