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
print("""\n ██╗ █████╗ ██████╗ ██╗ ██╗██╗███████╗\n ██║██╔══██╗██╔══██╗██║ ██║██║██╔════╝\n ██║███████║██████╔╝██║ ██║██║███████╗\n██ ██║██╔══██║██╔══██╗╚██╗ ██╔╝██║╚════██║\n╚█████╔╝██║ ██║██║ ██║ ╚████╔╝ ██║███████║
\n""")
import sys
print(sys.version)
print(f"Python Runtime: {sys.version}")
skills = [GPT(), Alarms(), Cal(), Gmail(), Reminders(), Timers(), Todos(), Weather(), Wolfram()]
skill_names = [skill.trigger_phrase for skill in skills]
print("test")
if __name__ == "__main__":
# print("Skill Trigger Phrases: ")

View File

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

View File

@ -11,8 +11,8 @@ Choice:
* Both would be more work, but would allow for more flexibility
"""
# from skills.skill import Skill
from skill import Skill
from skills.skill import Skill
# from skill import Skill
class Cal(Skill):
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)
"""
# from skills.skill import Skill
from skill import Skill
from skills.skill import Skill
# from skill import Skill
class Gmail(Skill):

View File

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

View File

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

View File

@ -67,10 +67,10 @@ import re
from datetime import datetime, timedelta
import time
# if __name__ == '__main__':
from config import default_morning_time, default_afternoon_time, default_evening_time
# else:
# from skills.config import default_morning_time, default_afternoon_time, default_evening_time
if __name__ == '__main__':
from config import default_morning_time, default_afternoon_time, default_evening_time
else:
from skills.config import default_morning_time, default_afternoon_time, default_evening_time
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)
"""
# from skills.skill import Skill
from skill import Skill
from skills.skill import Skill
# from skill import Skill
class Reminders(Skill): # ntfy.sh notification?
@ -47,4 +47,5 @@ class Reminders(Skill): # ntfy.sh notification?
pass #Convert verbal location into standardized format
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
# if __name__ == "__main__": # Handle running this script directly vs as a project
from config import ntfy_url
from utility import parsetime2
from skill import Skill
# else:
# from skills.config import ntfy_url
# from skills.utility import parsetime2
# from skills.skill import Skill
if __name__ == "__main__": # Handle running this script directly vs as a project
from config import ntfy_url
from utility import parsetime2
from skill import Skill
else:
from skills.config import ntfy_url
from skills.utility import parsetime2
from skills.skill import Skill
import threading
import schedule

View File

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

View File

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

View File

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

View File

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

View File

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