├── 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 | Logo 4 | 5 |

LET'S BEGIN THE JOURNEY

6 | Logo 7 | 8 |

9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |

18 | 19 | # About The Project 20 | Robert is a personal assistant with a text and speech based interface that allows you to keep track of your day with a task and alarms manager. With its inbuilt code snippets manager, it allows you to retrieve, create, delete and edit your snippets which prevents repetition. with its 3 themes, it a fit for everybody with different color tastes. 21 | At last but not least you can open the GUI or give commands to Robert without using a mouse but with the hotkeys 22 | 23 | 24 | # Usage 25 | - Robert: Robert has its own unique features like Wikipedia: Wikipedia 🎓, open software 🚀, weather ☀️, play music 🎵 and at last the **POWER MODE** 🧪. 26 | - Task Manager: Can't remember the task the boss has given you? Just write them here 📝. 27 | - Alarm: Here is the alarm so you never forget to do something on time ⏰. 28 | - Translation: What's the meaning of that? Just search it here 🌐. 29 | - Code Snippet: Finding your old code on Github, StackOverflow, or in computer files? Save the code snippets which you use the most so you use them at the go! 👨‍💻. 30 | - Setting: let's CHANGE THE COLORS! 🎨. 31 | - And at last, it has hotkeys too so want to give commands by summoning Robert! or open the home page GUI! ⌨️. 32 | 33 | 34 | 35 | ### Robert 36 | The main heart of the project and the basically it does the everything say to him you can give him commands as commander by pressing a hotkey which is `shift+7` or by right-clicking on this icon in the system tray as shown here and selecting the **Robert Listner**:- 37 | 38 | 39 | 40 | So let me tell you all the things it can do or the things you can do by speaking are Wikipedia, open youtube, open google (I know this one is funny but what goes to add it and it funny to mention it 😅), open Gmail, show weather, tell time, tell day, tell the date, who are you, who made you, open StackOverflow, news, open cmd, open calculator, do a search, take a screenshot, play music, open notepad and THE POWER MODE (It is a simple thing you can ask the Robert any scientific question 😋). 41 | 42 | ### **CODE SNIPPET** 43 | Here is your most useful thing! So honestly tell me how many times you ever search for a code that has some lines of code or a project on Github in which you have used a module and you can't remember what module was it and how you used it (I know everyone has done this in there life if you didn't then you are a noob!), So this is the best thing for this type of situation it will store the code in the database and which you can just sync or make a list for it so you can never lose the code. It is easy to open the code snippet thing right click on that icon in the system tray that I have mentioned earlier and choose the **Home Page** or press shift+tab+6 and you will get the code snippet GUI button in the front from there you can access the code snippet GUI and there you can select the files of any language and later on you can sort them, name the code snippet and to just access the code press on the code's name and it will be copied to your clipboard and then you can just past it and do whatever you want! 44 | If you didn't understand then see this:- 45 | 46 | 47 | 48 | ### Task Manger 49 | So here comes the GUI's. They have very good things and we thought why not give you guys a task manager like if you forgot that today is your's mom's or her's 😉 birthday eh leave it like you miss a task or your angry boss gave you a lot of tasks and your lazy brain can't handle them then just write them down so you don't forget the task and you don't get fired from the company (I have done research there are fewer chances to get fired by forgetting the task 🤣). And you can edit the task name, description, and priority. 50 | 51 | 52 | 53 | ### Alarm 54 | The name is self-explanatory. And you can set the alarm up give it the timing when to ring the alarm and when the alarm matches the time you set, It will give you a notification and will ring a beep sound, So you never forget to do the work on time. 55 | 56 | 57 | 58 | ### Translation 59 | As straight out of the word as it sounds. You might often face some foreign or new words that you have never met before. So here it is your translator for the same. 60 | 61 | 62 | 63 | ### Settings 64 | Simply you can change the theme of the GUI. 65 | 66 | 67 | 68 | ## Installation 69 | Now your mind will be saying so how to get this thing so here is it:- 70 | For installing the whole project the you must need Python and Git. 71 | ``` 72 | # Clone the repo (Open your Terminal, navigate to your preferred directory and execute) 73 | git clone https://github.com/Champions-clan/Robert-Assistant 74 | 75 | # Cd into the directory 76 | cd Robert-Assistant 77 | 78 | # Install the requirements (Install all the dependencies, might take time depending on your internet speed) 79 | pip install -r requirements.txt 80 | 81 | # Run the bad boy 82 | pythonw Main.py 83 | ``` 84 | Keep in mind that it is a background script so see your taskbar there you will find the icon in the system tray and first the GUI will open after closing the GUI you can give commands to the Robert but to give the Roberts command again just use the hotkey `+7` or that icon in the system tray and to open the GUI just right click on the icon in the system tray or press the hotkey `+6`. 85 | 86 | Now enjoy the project 😉. 87 | 88 | ## Contributions 89 | So you want to make an improvement or want to make a whole new feature? Well, we also want to see that how we have impacted the community or how the community can improve this project for different uses. However, as this project is a part of **Third Timathon Code Jam**, we are not allowed to make any changes to the project after the submission time ends. So, we won't be merging any pull requests. But after the jam finishes. PR's will be accepted. 90 | 91 | ## Champions Clan 92 | We are four! 93 | 94 | - Rajvir Singh aka RajvirSingh1313 95 | - Abdella Solomon aka Abdesol 96 | - Dawn Saju aka DawnSaju 97 | - Harsh Pandey aka akionsight 98 | 99 | **Created by, with & for the Community**❤ 100 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | clipboard==0.0.4 2 | googletrans==3.1.0a0 3 | PyQt5==5.15.2 4 | keyboard 5 | notify-py 6 | notify-run 7 | pyttsx3 8 | SpeechRecognition 9 | datetime 10 | wikipedia 11 | wolframalpha 12 | matplotlib 13 | Pillow 14 | schedule 15 | --------------------------------------------------------------------------------