readd skills. with ifmain statements for individual file running
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s

This commit is contained in:
samerbam 2023-09-14 10:34:27 -04:00
parent a9d5be8062
commit 9cc2927beb
14 changed files with 57 additions and 54 deletions

View File

@ -10,14 +10,16 @@ from skills.wolfram import Wolfram
from NLP import NLP from NLP import NLP
print("""\n ██╗ █████╗ ██████╗ ██╗ ██╗██╗███████╗\n ██║██╔══██╗██╔══██╗██║ ██║██║██╔════╝\n ██║███████║██████╔╝██║ ██║██║███████╗\n██ ██║██╔══██║██╔══██╗╚██╗ ██╔╝██║╚════██║\n╚█████╔╝██║ ██║██║ ██║ ╚████╔╝ ██║███████║
\n""")
import sys import sys
print(sys.version) print(f"Python Runtime: {sys.version}")
skills = [GPT(), Alarms(), Cal(), Gmail(), Reminders(), Timers(), Todos(), Weather(), Wolfram()] skills = [GPT(), Alarms(), Cal(), Gmail(), Reminders(), Timers(), Todos(), Weather(), Wolfram()]
skill_names = [skill.trigger_phrase for skill in skills] skill_names = [skill.trigger_phrase for skill in skills]
print("test")
if __name__ == "__main__": if __name__ == "__main__":
# print("Skill Trigger Phrases: ") # print("Skill Trigger Phrases: ")

View File

@ -8,14 +8,14 @@ Maybe we just call timers.py from here?
import requests import requests
# if __name__ == "__main__": # Handle running this script directly vs as a project if __name__ == "__main__": # Handle running this script directly vs as a project
from config import ntfy_url from config import ntfy_url
from utility import parsetime6 from utility import parsetime6
from skill import Skill from skill import Skill
# else: else:
# from skills.config import ntfy_url from skills.config import ntfy_url
# from skills.utility import parsetime from skills.utility import parsetime
# from skills.skill import Skill from skills.skill import Skill
import threading import threading
import schedule import schedule

View File

@ -11,8 +11,8 @@ Choice:
* Both would be more work, but would allow for more flexibility * Both would be more work, but would allow for more flexibility
""" """
# from skills.skill import Skill from skills.skill import Skill
from skill import Skill # from skill import Skill
class Cal(Skill): class Cal(Skill):
def __init__(self): def __init__(self):

View File

@ -6,8 +6,8 @@ https://developers.google.com/gmail/api/quickstart/python
https://git.imsam.ca/sam/ThermalTodos/src/branch/main/application/sync_calendar.py (for autherizing user) https://git.imsam.ca/sam/ThermalTodos/src/branch/main/application/sync_calendar.py (for autherizing user)
""" """
# from skills.skill import Skill from skills.skill import Skill
from skill import Skill # from skill import Skill
class Gmail(Skill): class Gmail(Skill):

View File

@ -1,6 +1,6 @@
# from skills.skill import Skill from skills.skill import Skill
from skill import Skill # from skill import Skill
class GPT(Skill): class GPT(Skill):

View File

@ -1,11 +1,11 @@
import requests import requests
# if __name__ == '__main__': if __name__ == '__main__':
from skill import Skill from skill import Skill
from config import ntfy_url from config import ntfy_url
# else: else:
# from skills.skill import Skill from skills.skill import Skill
# from skills.config import ntfy_url from skills.config import ntfy_url
class Phone(Skill): class Phone(Skill):

View File

@ -67,10 +67,10 @@ import re
from datetime import datetime, timedelta from datetime import datetime, timedelta
import time import time
# if __name__ == '__main__': if __name__ == '__main__':
from config import default_morning_time, default_afternoon_time, default_evening_time from config import default_morning_time, default_afternoon_time, default_evening_time
# else: else:
# from skills.config import default_morning_time, default_afternoon_time, default_evening_time from skills.config import default_morning_time, default_afternoon_time, default_evening_time
morning_datetime = datetime.strptime(default_morning_time, "%H:%M") morning_datetime = datetime.strptime(default_morning_time, "%H:%M")

View File

@ -12,8 +12,8 @@ Even better, use this library: https://github.com/picklepete/pyicloud/blob/maste
(icloud reminders api, reads/writes reminders from/to ios reminders app) (icloud reminders api, reads/writes reminders from/to ios reminders app)
""" """
# from skills.skill import Skill from skills.skill import Skill
from skill import Skill # from skill import Skill
class Reminders(Skill): # ntfy.sh notification? class Reminders(Skill): # ntfy.sh notification?
@ -48,3 +48,4 @@ class Reminders(Skill): # ntfy.sh notification?
def _parse_time(self, time_text): def _parse_time(self, time_text):
pass #Convert time into standardized format pass #Convert time into standardized format
#use parsetime6 from utility.py

View File

@ -1,13 +1,13 @@
import requests import requests
# if __name__ == "__main__": # Handle running this script directly vs as a project if __name__ == "__main__": # Handle running this script directly vs as a project
from config import ntfy_url from config import ntfy_url
from utility import parsetime2 from utility import parsetime2
from skill import Skill from skill import Skill
# else: else:
# from skills.config import ntfy_url from skills.config import ntfy_url
# from skills.utility import parsetime2 from skills.utility import parsetime2
# from skills.skill import Skill from skills.skill import Skill
import threading import threading
import schedule import schedule

View File

@ -2,8 +2,8 @@
""" """
# from skills.skill import Skill from skills.skill import Skill
from skill import Skill # from skill import Skill
class Todos(Skill): # Notion api? reminders app? class Todos(Skill): # Notion api? reminders app?

View File

@ -1,10 +1,10 @@
import requests import requests
# from skills.config import deepl_api_key from skills.config import deepl_api_key
# from skills.config import google_api_key from skills.config import google_api_key
# from skills.skill import Skill from skills.skill import Skill
from config import deepl_api_key # from config import deepl_api_key
from config import google_api_key # from config import google_api_key
from skill import Skill # from skill import Skill
""" """
Reading material for this: Reading material for this:

View File

@ -7,10 +7,10 @@ import natural_time
from datetime import datetime from datetime import datetime
import time import time
# if __name__ == '__main__': if __name__ == '__main__':
from regexTimeParser import RegexTimeParser from regexTimeParser import RegexTimeParser
# else: else:
# from skills.regexTimeParser import RegexTimeParser from skills.regexTimeParser import RegexTimeParser
""" """
Reading Material: Reading Material:

View File

@ -1,6 +1,6 @@
# from skills.skill import Skill from skills.skill import Skill
from skill import Skill # from skill import Skill
class Weather(Skill): #open weather map api class Weather(Skill): #open weather map api
def __init__(self): def __init__(self):

View File

@ -1,6 +1,6 @@
# from skills.skill import Skill from skills.skill import Skill
from skill import Skill # from skill import Skill
class Wolfram(Skill): #wolfram alpha api class Wolfram(Skill): #wolfram alpha api
def __init__(self): def __init__(self):