├── App
├── Gui.py
├── Robert.pyw
├── __init__.py
├── __pycache__
│ └── db_worker.cpython-38.pyc
└── db_worker.py
├── Assets
├── Logo_banner.png
├── Robert Logo.png
├── Robert.gif
├── Robert_Typography.gif
├── alarm.gif
├── beep.wav
├── code-snippets-.gif
├── fonts
│ ├── Cabin-Medium.ttf
│ ├── Goldman-Bold.ttf
│ ├── Lato-Regular.ttf
│ ├── PirataOne-Regular.ttf
│ ├── RobotoMono-Regular.ttf
│ └── TitilliumWeb-Bold.ttf
├── images
│ ├── add_btn.png
│ ├── add_icon2.jpg
│ ├── alarm.png
│ ├── checked.png
│ ├── copying.png
│ ├── del_icon.png
│ ├── edit_icon.png
│ ├── exit_icon.png
│ ├── home.png
│ ├── left_arrow.png
│ ├── off.png
│ ├── on.png
│ ├── right_arrow.png
│ ├── search_icon.png
│ ├── setting.png
│ ├── task.png
│ ├── translate.png
│ ├── translation.png
│ └── unchecked.png
├── robert.png
├── system_tray.png
├── taskmanager.gif
├── themes.png
└── translator.gif
├── Database
├── RobertStorage.db
└── robert.settings.json
├── Main.py
├── README.md
└── requirements.txt
/App/Robert.pyw:
--------------------------------------------------------------------------------
1 | import pyttsx3
2 | import speech_recognition as sr
3 | import datetime
4 | import time
5 | import wikipedia
6 | import webbrowser
7 | import wolframalpha
8 | import os
9 | import random
10 | import matplotlib.pyplot as plt
11 | from PIL import ImageGrab
12 |
13 |
14 | def speak(audio):
15 | engine = pyttsx3.init()
16 | voices = engine.getProperty('voices')
17 | engine.setProperty('voice', voices[0].id)
18 | engine.say(audio)
19 | engine.runAndWait()
20 |
21 | def takeCommand():
22 |
23 | r = sr.Recognizer()
24 | with sr.Microphone() as source:
25 | print('Listening')
26 | r.pause_threshold = 0.7
27 | audio = r.listen(source)
28 | try:
29 | print("Recognizing")
30 | statement = r.recognize_google(audio, language='en-in')
31 | print("the command is printed=", statement)
32 |
33 | except Exception as e:
34 | print(e)
35 | print("Say that again sir")
36 | speak("Sir press hotkey again to give command")
37 | print("Sir press hotkey again to give command")
38 | return "None"
39 |
40 | return statement
41 |
42 |
43 |
44 | def tellDay():
45 | day = datetime.datetime.today().weekday() + 1
46 | Day_dict = {1: 'Monday', 2: 'Tuesday',
47 | 3: 'Wednesday', 4: 'Thursday',
48 | 5: 'Friday', 6: 'Saturday',
49 | 7: 'Sunday'}
50 |
51 | if day in Day_dict.keys():
52 | day_of_the_week = Day_dict[day]
53 | speak("The day is " + day_of_the_week)
54 |
55 |
56 | def grabPhoto():
57 | try:
58 | cap = cv2.VideoCapture(0)
59 | if cap.isOpened():
60 | ret, frame = cap.read()
61 | else:
62 | ret = False
63 | img1 = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
64 | speak('Image Captured!')
65 | print(green + '\n\tDone!' + reset)
66 | plt.imshow(img1)
67 | plt.title('Image Camera-1')
68 | plt.xticks([])
69 | plt.yticks([])
70 | plt.show()
71 | cap.release()
72 | except Exception as e:
73 | print(red + '\n\tUnable to Grab Image!' + reset)
74 | speak('Unable to Grab Image!')
75 |
76 |
77 | def wishMe():
78 | hour = datetime.datetime.now().hour
79 | if hour >= 0 and hour < 12:
80 | speak("Hello,Good Morning")
81 | print("Hello,Good Morning")
82 | elif hour >= 12 and hour < 18:
83 | speak("Hello,Good Afternoon")
84 | print("Hello,Good Afternoon")
85 | else:
86 | speak("Hello,Good Evening")
87 | print("Hello,Good Evening")
88 |
89 |
90 | def playMusic():
91 | try:
92 | music_dir = input("Enter your file Directory: ")
93 | songNum = random.randint(0, 159)
94 | songs = os.listdir(music_dir)
95 | os.startfile(os.path.join(music_dir, songs[songNum]))
96 | print(green + '\n\tPlaying Music! ' + reset)
97 | speak('Playing Music!')
98 | except Exception as e:
99 | speak('Unable to Play Music From Your Device!')
100 | print(red + '\n\tUnable to Play Music!' + reset)
101 |
102 | def take_speak_command():
103 | #wishMe()
104 | speak("Nice To See You Again")
105 | statement = takeCommand().lower()
106 | if statement == 0:
107 |
108 | if 'wikipedia' in statement:
109 | speak('Searching Wikipedia...')
110 | statement = statement.replace("wikipedia", "")
111 | results = wikipedia.summary(statement, sentences=3)
112 | speak("According to Wikipedia")
113 | speak(results)
114 |
115 | elif 'open youtube' in statement:
116 | webbrowser.open_new_tab("https://www.youtube.com")
117 | speak("youtube is open now")
118 | time.sleep(5)
119 |
120 | elif 'open google' in statement:
121 | webbrowser.open_new_tab("https://www.google.com")
122 | speak("Google chrome is open now")
123 | time.sleep(5)
124 |
125 | elif 'open gmail' in statement:
126 | webbrowser.open_new_tab("gmail.com")
127 | speak("Google Mail open now")
128 | time.sleep(5)
129 |
130 | elif "weather" in statement:
131 | api_key = "8ef61edcf1c576d65d836254e11ea420"
132 | base_url = "https://api.openweathermap.org/data/2.5/weather?"
133 | speak("whats the city name")
134 | city_name = takeCommand()
135 | complete_url = base_url+"appid="+api_key+"&q="+city_name
136 | response = requests.get(complete_url)
137 | x = response.json()
138 | if x["cod"] != "404":
139 | y = x["main"]
140 | current_temperature = y["temp"]
141 | current_humidiy = y["humidity"]
142 | z = x["weather"]
143 | weather_description = z[0]["description"]
144 | speak(" Temperature in kelvin unit is " +
145 | str(current_temperature) +
146 | "\n humidity in percentage is " +
147 | str(current_humidiy) +
148 | "\n description " +
149 | str(weather_description))
150 |
151 | else:
152 | speak(" City Not Found ")
153 |
154 | elif 'time' in statement:
155 | strTime = datetime.datetime.now().strftime("%H:%M:%S")
156 | speak(f"the time is {strTime}")
157 |
158 | elif 'date' in statement:
159 | speak(date.today().day)
160 |
161 | elif 'day' in statement:
162 | tellDay()
163 |
164 | elif 'who are you' in statement or 'what can you do' in statement:
165 | speak('I am Robert your persoanl assistant. I am programmed to minor tasks like'
166 | 'opening youtube,google chrome,gmail and stackoverflow ,predict time,search wikipedia,predict weather'
167 | 'in different cities , get top headline news from times of india and you can ask me computational or scientific questions too!')
168 |
169 | elif "who made you" in statement or "who created you" in statement or "who discovered you" in statement:
170 | speak("I was built by Champions Clan for timathon")
171 |
172 | elif "open stackoverflow" in statement:
173 | webbrowser.open_new_tab("https://stackoverflow.com/")
174 | speak("Here is stackoverflow")
175 |
176 | elif 'news' in statement:
177 | news = webbrowser.open_new_tab(
178 | "https://timesofindia.indiatimes.com/home/headlines")
179 | speak('Here are some headlines from the Times of India,Happy reading')
180 | time.sleep(6)
181 |
182 | elif 'open cmd' in statement or 'command prompt' in statement:
183 | print(yellow + '\n\tOpening COMMAND PROMPT!' + reset)
184 | speak('Opening Command Promt')
185 | os.startfile('C:\\Windows\\System32\\cmd.exe')
186 |
187 | elif 'open calculator' in statement:
188 | print(yellow + '\n\tOpening CALCULATOR' + reset)
189 | speak('Opening Calculator!')
190 | os.startfile('C:\\Windows\\System32\\calc.exe')
191 |
192 | elif 'search' in statement:
193 | statement = statement.replace("search", "")
194 | webbrowser.open_new_tab(statement)
195 | time.sleep(5)
196 |
197 | elif 'screenshot' in statement or 'screen shot' in statement:
198 | speak("Grabbing Screenshot!")
199 | print(yellow + '\n\tDone!' + reset)
200 | img = ImageGrab.grab()
201 | speak("Done!")
202 | img.show()
203 |
204 | elif 'play music' in statement or 'play song' in statement:
205 | playMusic()
206 |
207 | elif 'open notepad' in statement:
208 | print(yellow + '\n\tOpening NOTEPAD!' + reset)
209 | speak('Opening Notepad')
210 | os.startfile('C:\\Windows\\system32\\notepad.exe')
211 |
212 | elif "start power mode" in statement or "power mode" in statement:
213 | speak('I can answer to Computational and Scientific questions and what question do you want to ask now')
214 | question = takeCommand()
215 | app_id = "R2K75H-7ELALHR35X"
216 | client = wolframalpha.Client('R2K75H-7ELALHR35X')
217 | res = client.statement(question)
218 | answer = next(res.results).text
219 | speak(answer)
220 |
221 |
222 | if __name__ == "__main__":
223 | take_speak_command()
224 |
--------------------------------------------------------------------------------
/App/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/App/__init__.py
--------------------------------------------------------------------------------
/App/__pycache__/db_worker.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/App/__pycache__/db_worker.cpython-38.pyc
--------------------------------------------------------------------------------
/App/db_worker.py:
--------------------------------------------------------------------------------
1 | import sqlite3
2 | import time
3 | import datetime
4 | import json
5 |
6 | class DbWorker:
7 | def __init__(self):
8 | conn, cursor = self.set_up_db()
9 | settings = self.set_up_settings_file()
10 |
11 | def set_up_db(self):
12 | conn = sqlite3.connect('./Database/RobertStorage.db', timeout=30.0)
13 | cursor = conn.cursor()
14 | cursor.execute("CREATE TABLE IF NOT EXISTS snippets (snippet_number INTEGER PRIMARY KEY, snippet TEXT, snippet_language TEXT,snippet_name TEXT, date_created REAL, times_used INTEGER)")
15 | cursor.execute(
16 | "CREATE TABLE IF NOT EXISTS alarms (alarm_number INTEGER PRIMARY KEY,alarm_name TEXT,is_alarm_on BOOLEAN, repeat_frequncy INTEGER,alarm_time INTEGER)")
17 | cursor.execute(
18 | "CREATE TABLE IF NOT EXISTS tasks (task_number INTEGER PRIMARY KEY,task_name TEXT, task_description TEXT, priority INTEGER ,checked BOOLEAN,time_created REAL)")
19 | conn.commit()
20 | return conn, cursor
21 |
22 | class Snippets(DbWorker):
23 | def __init__(self):
24 | self.conn, self.cursor = super().set_up_db()
25 |
26 | def insert_snippet(self, snippet, snippet_language, snippet_name):
27 | """
28 | Inserts snippets
29 | Arguments required
30 | - snippet
31 | - snippet_language
32 | - snippet_name
33 | Returns true if query is successful, False if not
34 | """
35 | try:
36 |
37 | self.cursor.execute("INSERT INTO snippets (snippet_number, snippet, snippet_language, snippet_name, date_created, times_used) VALUES (?, ?, ?,?, ?, ?)",
38 | (None, snippet, snippet_language, snippet_name, str(time.time()), 0))
39 | self.conn.commit()
40 | return True
41 | except:
42 | return False
43 |
44 | def list_snippets(self):
45 | self.cursor.execute("SELECT * FROM snippets")
46 | return self.cursor.fetchall()
47 |
48 | def snippet_used(self, snippet_number):
49 | """
50 | This number keeps the record whenever snippets are used
51 | it must be called whenever the snippet is used
52 | takes the argument of the snippet number
53 | """
54 | self.cursor.execute(
55 | 'SELECT * FROM snippets WHERE snippet_number=?', (snippet_number, ))
56 | res = self.cursor.fetchone()
57 | self.cursor.execute('UPDATE snippets SET times_used=? WHERE snippet_number=?', (int(
58 | res[5]) + 1, snippet_number,))
59 | self.conn.commit()
60 |
61 | def delete_snippet(self, snippet_number):
62 | """
63 | This deletes snippet
64 | deletes the snippet when supplied by the snippet number
65 | """
66 | try:
67 |
68 | self.cursor.execute("DELETE FROM snippets WHERE snippet_number=?",
69 | (snippet_number, ))
70 |
71 | self.conn.commit()
72 | return True
73 | except:
74 | return False
75 |
76 | def query_snippets_by_name(self, snippet_name):
77 | query_res = self.cursor.execute(
78 | f"SELECT * FROM snippets WHERE snippet_name LIKE '{snippet_name}%'")
79 | return self.cursor.fetchall()
80 |
81 | def sort_by_usage(self, most=True):
82 | if most:
83 | self.cursor.execute(
84 | "SELECT * FROM snippets ORDER BY times_used ASC")
85 | else:
86 | self.cursor.execute(
87 | "SELECT * FROM snippets ORDER BY times_used DESC")
88 | return self.cursor.fetchall()
89 |
90 | def sort_by_date_created(self, ascending=True):
91 | if ascending:
92 | self.cursor.execute(
93 | "SELECT * FROM snippets ORDER BY date_created ASC")
94 | else:
95 | self.cursor.execute(
96 | "SELECT * FROM snippets ORDER BY date_created DESC")
97 | return self.cursor.fetchall()
98 |
99 | def edit_snippet(self, snippet_number_to_update, new_snippet, new_snippet_language, new_snippet_name):
100 | try:
101 | self.cursor.execute("UPDATE snippets SET snippet=?, snippet_language=?, snippet_name=? WHERE snippet_number=?", (new_snippet, new_snippet_language, new_snippet_name, snippet_number_to_update))
102 | self.conn.commit()
103 | return True
104 | except:
105 | return False
106 |
107 |
108 | def parse_snippet(self, snippet):
109 | return {
110 | "snippet_number": snippet[0],
111 | "snippet": snippet[1],
112 | "snippet_language": snippet[2],
113 | "snippet_name": snippet[3],
114 | "date_created": snippet[4],
115 | "times_used": snippet[5]
116 | }
117 |
118 | class Alarms(DbWorker):
119 | def __init__(self):
120 | self.conn, self.cursor = super().set_up_db()
121 |
122 |
123 | def convert_to_24_clock(self, hour, minute, AM=True):
124 | if AM:
125 | return hour, minute
126 | else:
127 | if hour == 12:
128 | return hour, minute
129 | else:
130 | return hour + 12, minute
131 | def __convert_to_minutes_from_midnight(self, hours, minutes):
132 | assert minutes <= 59
133 | assert hours <= 23
134 | return (hours * 60) + minutes
135 |
136 | def back_to_hours_and_minutes(self, minutes_from_midnight):
137 | return minutes_from_midnight // 60, minutes_from_midnight % 60
138 |
139 | def insert_alarm(self, alarm_name: str,alarm_hour: int, alarm_minutes: int):
140 | try:
141 | mins_frm_midnight = self.__convert_to_minutes_from_midnight(
142 | alarm_hour, alarm_minutes)
143 | self.cursor.execute(
144 | "INSERT INTO alarms (alarm_number, alarm_name ,is_alarm_on ,alarm_time) VALUES (?, ?, ?, ?)", (None, alarm_name ,True, mins_frm_midnight, ))
145 | self.conn.commit()
146 | return True
147 | except:
148 | return False
149 | def edit_alarm(self, alarm_number, new_alarm_name, new_alarm_hour, new_alarm_minute):
150 | try:
151 | mins_frm_midnight = self.__convert_to_minutes_from_midnight(
152 | new_alarm_hour, new_alarm_minute)
153 | self.cursor.execute(
154 | "UPDATE alarms SET alarm_name=?, alarm_time=? WHERE alarm_number=?", (new_alarm_name, mins_frm_midnight, alarm_number))
155 | self.conn.commit()
156 | return True
157 | except:
158 | return False
159 | def delete_alarm(self, alarm_number):
160 | try:
161 | self.cursor.execute(
162 | "DELETE FROM alarms WHERE alarm_number=?", (alarm_number, ))
163 | self.conn.commit()
164 | return True
165 | except:
166 | return False
167 |
168 | def convert_to_12_hour_clock(self, minutes_from_minight):
169 | time = self.back_to_hours_and_minutes(minutes_from_minight)
170 |
171 | if (time[0] < 12):
172 | Meridien = "AM";
173 | else:
174 | Meridien = "PM";
175 |
176 | if Meridien == "AM":
177 | return (time[0], time[1], Meridien)
178 | else:
179 | return (time[0] - 12, time[1], Meridien)
180 |
181 |
182 | def turn_alarm_on(self, alarm_number):
183 | try:
184 | self.cursor.execute("UPDATE alarms SET is_alarm_on=? WHERE alarm_number=?", (True, alarm_number))
185 | self.conn.commit()
186 | return True
187 | except:
188 | return False
189 |
190 | def turn_alarm_off(self, alarm_number):
191 | try:
192 | self.cursor.execute("UPDATE alarms SET is_alarm_on=? WHERE alarm_number=?", (False, alarm_number))
193 | self.conn.commit()
194 | return True
195 | except:
196 | return False
197 |
198 | def list_alarms(self):
199 | try:
200 | self.cursor.execute("SELECT * FROM alarms")
201 | return self.cursor.fetchall()
202 | except:
203 | return False
204 |
205 | def listen_for_alarms(self, callback_func):
206 | timm = self.__convert_to_minutes_from_midnight(datetime.datetime.now().hour, datetime.datetime.now().minute)
207 | self.cursor.execute("SELECT * FROM alarms WHERE is_alarm_on=?", (True, ))
208 | data = self.cursor.fetchall()
209 | for i in data:
210 | if i[4] == timm:
211 | callback_func(i)
212 |
213 |
214 | def parse_alarms(self, alarm):
215 | hour, minute = self.back_to_hours_and_minutes(alarm[1])
216 | return {
217 | "alarm_number": alarm[0],
218 | "alarm_hour": hour,
219 | "alarm_minute": minute,
220 | "alarm_repeat": alarm[2]
221 | }
222 |
223 |
224 | # class TaskManager(DbWorker):
225 | # def __init__(self):
226 | # conn, cursor = super().set_up_db()
227 |
228 | # def insert_tasks(self, task_name, task_description, priority_level):
229 | # assert priority_level > 5
230 | # assert priority_level < 0
231 | # self.cursor.execute("INSERT INTO tasks (task)")
232 |
233 | # class PriorityLevelNotRight(Exception):
234 | # pass
235 |
236 |
237 |
238 | class SettingsManager:
239 | def get_settings(self):
240 | with open('./Database/robert.settings.json') as file:
241 | jason = file.read()
242 | # print(jason)
243 | parsed_json = json.loads(jason)
244 | return parsed_json
245 |
246 | def change_settings(self, new_settings):
247 | with open('./database/robert.settings.json', 'w+') as file:
248 | json.dump(new_settings, file, indent=6)
249 |
250 | class TaskManager(DbWorker):
251 | def __init__(self):
252 | self.conn, self.cursor = super().set_up_db()
253 |
254 | def insert_task(self, task_name, task_description, priority_level):
255 | try:
256 | self.cursor.execute("INSERT INTO tasks (task_number,task_name, task_description, priority, checked ,time_created) VALUES (?, ?, ?, ?, ?, ?)",
257 | (None, task_name, task_description, priority_level, False,time.time(),))
258 | self.conn.commit()
259 | return True
260 | except:
261 | return False
262 |
263 | def delete_task(self, task_number):
264 | try:
265 | self.cursor.execute(
266 | "DELETE FROM tasks WHERE task_number=?", (task_number,))
267 | self.conn.commit()
268 | return True
269 | except:
270 | return False
271 |
272 | def check_task(self, task_number):
273 | try:
274 | self.cursor.execute("UPDATE tasks SET checked=? WHERE task_number=?", (True, task_number))
275 | self.conn.commit()
276 | return True
277 | except:
278 | return False
279 |
280 | def uncheck_task(self, task_number):
281 | try:
282 | self.cursor.execute("UPDATE tasks SET checked=? WHERE task_number=?", (False, task_number))
283 | self.conn.commit()
284 | return True
285 | except:
286 | return False
287 |
288 | def list_tasks(self, sort_by_priority=False):
289 | if sort_by_priority:
290 | self.cursor.execute("SELECT * FROM tasks ORDER BY priority DESC")
291 | return self.cursor.fetchall()
292 |
293 | else:
294 | self.cursor.execute("SELECT * FROM tasks ORDER BY time_created DESC")
295 | return self.cursor.fetchall()
296 |
297 | def edit_tasks(self, number_to_edit,new_taskname, new_task_descripton, new_task_prioirty):
298 | try:
299 | self.cursor.execute("UPDATE tasks SET task_name=?, task_description=?, priority=? WHERE task_number=?", (new_taskname, new_task_descripton, new_task_prioirty, number_to_edit))
300 | self.conn.commit()
301 | return True
302 | except:
303 | return False
--------------------------------------------------------------------------------
/Assets/Logo_banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/Logo_banner.png
--------------------------------------------------------------------------------
/Assets/Robert Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/Robert Logo.png
--------------------------------------------------------------------------------
/Assets/Robert.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/Robert.gif
--------------------------------------------------------------------------------
/Assets/Robert_Typography.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/Robert_Typography.gif
--------------------------------------------------------------------------------
/Assets/alarm.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/alarm.gif
--------------------------------------------------------------------------------
/Assets/beep.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/beep.wav
--------------------------------------------------------------------------------
/Assets/code-snippets-.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/code-snippets-.gif
--------------------------------------------------------------------------------
/Assets/fonts/Cabin-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/fonts/Cabin-Medium.ttf
--------------------------------------------------------------------------------
/Assets/fonts/Goldman-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/fonts/Goldman-Bold.ttf
--------------------------------------------------------------------------------
/Assets/fonts/Lato-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/fonts/Lato-Regular.ttf
--------------------------------------------------------------------------------
/Assets/fonts/PirataOne-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/fonts/PirataOne-Regular.ttf
--------------------------------------------------------------------------------
/Assets/fonts/RobotoMono-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/fonts/RobotoMono-Regular.ttf
--------------------------------------------------------------------------------
/Assets/fonts/TitilliumWeb-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/fonts/TitilliumWeb-Bold.ttf
--------------------------------------------------------------------------------
/Assets/images/add_btn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/images/add_btn.png
--------------------------------------------------------------------------------
/Assets/images/add_icon2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/images/add_icon2.jpg
--------------------------------------------------------------------------------
/Assets/images/alarm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/images/alarm.png
--------------------------------------------------------------------------------
/Assets/images/checked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/images/checked.png
--------------------------------------------------------------------------------
/Assets/images/copying.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/images/copying.png
--------------------------------------------------------------------------------
/Assets/images/del_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/images/del_icon.png
--------------------------------------------------------------------------------
/Assets/images/edit_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/images/edit_icon.png
--------------------------------------------------------------------------------
/Assets/images/exit_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/images/exit_icon.png
--------------------------------------------------------------------------------
/Assets/images/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/images/home.png
--------------------------------------------------------------------------------
/Assets/images/left_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/images/left_arrow.png
--------------------------------------------------------------------------------
/Assets/images/off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/images/off.png
--------------------------------------------------------------------------------
/Assets/images/on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/images/on.png
--------------------------------------------------------------------------------
/Assets/images/right_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/images/right_arrow.png
--------------------------------------------------------------------------------
/Assets/images/search_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/images/search_icon.png
--------------------------------------------------------------------------------
/Assets/images/setting.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/images/setting.png
--------------------------------------------------------------------------------
/Assets/images/task.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/images/task.png
--------------------------------------------------------------------------------
/Assets/images/translate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/images/translate.png
--------------------------------------------------------------------------------
/Assets/images/translation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/images/translation.png
--------------------------------------------------------------------------------
/Assets/images/unchecked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/images/unchecked.png
--------------------------------------------------------------------------------
/Assets/robert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/robert.png
--------------------------------------------------------------------------------
/Assets/system_tray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/system_tray.png
--------------------------------------------------------------------------------
/Assets/taskmanager.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/taskmanager.gif
--------------------------------------------------------------------------------
/Assets/themes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/themes.png
--------------------------------------------------------------------------------
/Assets/translator.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Assets/translator.gif
--------------------------------------------------------------------------------
/Database/RobertStorage.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Champions-clan/Robert-Assistant/ba35af381fa58f738b5d0a0d87ff22aafdf8323e/Database/RobertStorage.db
--------------------------------------------------------------------------------
/Database/robert.settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Theme Mode": "D"
3 | }
4 |
--------------------------------------------------------------------------------
/Main.py:
--------------------------------------------------------------------------------
1 | from PyQt5.QtGui import *
2 | from PyQt5.QtWidgets import *
3 | import os
4 | import keyboard
5 | from App.db_worker import Alarms
6 | import schedule
7 | from notifypy import Notify
8 |
9 | os.system('python ./App/Gui.py')
10 |
11 |
12 | app = QApplication([])
13 | app.setQuitOnLastWindowClosed(False)
14 |
15 | icon = QIcon("./Assets/Robert logo.png")
16 |
17 |
18 | tray = QSystemTrayIcon()
19 | tray.setIcon(icon)
20 | tray.setVisible(True)
21 |
22 | menu = QMenu()
23 | btn = QAction("Home Page")
24 | btn2 = QAction("Robert Listner")
25 | btn.triggered.connect(lambda: os.system('python ./App/GUI.py'))
26 | btn2.triggered.connect(lambda: os.system('python ./App/Robert.pyw'))
27 |
28 | menu.addAction(btn)
29 | menu.addAction(btn2)
30 |
31 | quit = QAction("Quit")
32 | quit.triggered.connect(lambda: exit())
33 | menu.addAction(quit)
34 |
35 | keyboard.add_hotkey('shift+6', lambda: os.system('python ./App/GUI.py'))
36 | keyboard.add_hotkey('shift+7', lambda: os.system('python ./App/Robert.pyw'))
37 |
38 | tray.setContextMenu(menu)
39 |
40 | def this_will_run_when_alarm_rings(alarm):
41 | if alarm[2] == 0:
42 | pass
43 | else:
44 | alarm_ = Alarms()
45 | time = alarm_.convert_to_12_hour_clock(minutes_from_minight=alarm[4])
46 | notification = Notify()
47 | notification.title = alarm[1]
48 | notification.message = f"The time is {time[0]}:{time[1]} {time[2]}"
49 | notification.icon = "./Assets/Robert Logo.png"
50 | notification.audio = "./Assets/beep.wav"
51 | notification.send()
52 | alarm_.delete_alarm(alarm[0])
53 |
54 | alarm_manager = Alarms()
55 | def listen():
56 | alarm_manager.listen_for_alarms(this_will_run_when_alarm_rings)
57 |
58 | schedule.every().minute.at(':00').do(listen)
59 |
60 | while True:
61 | schedule.run_pending()
62 |
63 | app.exec_()
64 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |