From 045d9f2d840e4c286d7aa77520499e5dfaa3327e Mon Sep 17 00:00:00 2001 From: dinanz Date: Wed, 22 Mar 2023 13:00:22 -0400 Subject: [PATCH 1/5] added ideas file --- Contribution_Ideas.ipynb | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Contribution_Ideas.ipynb diff --git a/Contribution_Ideas.ipynb b/Contribution_Ideas.ipynb new file mode 100644 index 000000000..e69de29bb From 78733b39b048c70fe308466ec72bf9446abb98f6 Mon Sep 17 00:00:00 2001 From: dinanz Date: Sat, 8 Apr 2023 03:38:27 -0400 Subject: [PATCH 2/5] add more concise installation instructions and frequent problems to README' --- Contribution_Ideas.ipynb | 0 README.md | 21 ++++++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) delete mode 100644 Contribution_Ideas.ipynb diff --git a/Contribution_Ideas.ipynb b/Contribution_Ideas.ipynb deleted file mode 100644 index e69de29bb..000000000 diff --git a/README.md b/README.md index b5d55a0ec..9a9119453 100644 --- a/README.md +++ b/README.md @@ -8,14 +8,29 @@ A Personal Assistant for Linux, MacOS and Windows Jarvis is a simple personal assistant for Linux, MacOS and Windows which works on the command line. He can talk to you if you enable his voice. He can tell you the weather, he can find restaurants and other places near you. He can do some great stuff for you. -## Getting Started +## Getting Started With Installation -In order to start Jarvis just clone [this repository](https://github.com/sukeesh/Jarvis.git) and run `python installer`. +In order to install Jarvis, follow these steps: +1. Clone [this repository](https://github.com/sukeesh/Jarvis.git) with `git clone https://github.com/sukeesh/Jarvis.git` +2. Run the command `python installer` (or `python3 installer` if that doesn't work) from the terminal. -Run **Jarvis** from anywhere by command `jarvis` +Run **Jarvis** from anywhere by command `jarvis`, or `./jarvis` from within the project directory to start up Jarvis! You can start by typing `help` within the Jarvis command line to check what Jarvis can do for you. +### Frequently encountered issues +**Question**: When I run Jarvis, it shows an error relating to module not found +**Platform**: Windows +**Solution 1**: Uninstall and/or install the module package +Example: +Error: `ImportError: DLL load failed while importing win32api: The specified module could not be found.` +Solution: +`pip uninstall pywin32` +`pip install pywin32` or `conda instapll pywin32` +**Solution 2**: add the package to your environment variables system PATH. + + +If you find other issues and/or have found solutions to them on any platform, please consider adding to this list! ## Youtube Video Showing Jarvis From c8ccdcb81ea2f96af3e0a16c4ea89a9052240c98 Mon Sep 17 00:00:00 2001 From: dinanz Date: Sat, 8 Apr 2023 03:39:49 -0400 Subject: [PATCH 3/5] add concise installation instructions and troubleshooting FAQ --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 9a9119453..0fe60303d 100644 --- a/README.md +++ b/README.md @@ -19,15 +19,15 @@ Run **Jarvis** from anywhere by command `jarvis`, or `./jarvis` from within the You can start by typing `help` within the Jarvis command line to check what Jarvis can do for you. ### Frequently encountered issues -**Question**: When I run Jarvis, it shows an error relating to module not found -**Platform**: Windows -**Solution 1**: Uninstall and/or install the module package -Example: -Error: `ImportError: DLL load failed while importing win32api: The specified module could not be found.` -Solution: -`pip uninstall pywin32` -`pip install pywin32` or `conda instapll pywin32` -**Solution 2**: add the package to your environment variables system PATH. +**Question**: When I run Jarvis, it shows an error relating to module not found
+**Platform**: Windows
+**Solution 1**: Uninstall and/or install the module package
+Example:
+Error: `ImportError: DLL load failed while importing win32api: The specified module could not be found.`
+Solution:
+`pip uninstall pywin32`
+`pip install pywin32` or `conda instapll pywin32`
+**Solution 2**: add the package to your environment variables system PATH.
If you find other issues and/or have found solutions to them on any platform, please consider adding to this list! From 309595c939f48f09d77f22d1a2a9bb7bb6e1cff6 Mon Sep 17 00:00:00 2001 From: Amando Xu <83917723+PrettyAX@users.noreply.github.com> Date: Mon, 17 Apr 2023 13:44:27 -0400 Subject: [PATCH 4/5] Update shutdown.py Implement changes to shutdown where reboot is renamed reboot_computer and additional changes to Mac OS --- jarviscli/plugins/shutdown.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/jarviscli/plugins/shutdown.py b/jarviscli/plugins/shutdown.py index 755779657..f99474b04 100644 --- a/jarviscli/plugins/shutdown.py +++ b/jarviscli/plugins/shutdown.py @@ -60,7 +60,7 @@ def shutdown_WIN32(jarvis, s): @require(platform=LINUX) -@plugin('reboot') +@plugin('reboot_computer') def reboot_LINUX(jarvis, s): """Reboot the system""" if s == '': @@ -70,15 +70,22 @@ def reboot_LINUX(jarvis, s): @require(platform=MACOS) -@plugin('reboot') +@plugin('reboot_computer') def reboot_MACOS(jarvis, s): """Reboot the system""" - string = 'sudo shutdown -r now' - os.system(string) + if s == '': + s = jarvis.input('reboot? y/n: ') + if s == 'y': + jarvis.say('rebooting system') + string = 'sudo shutdown -r now' + os.system(string) + if s == 'n': + jarvis.say('reboot cancelled') + return @require(platform=WINDOWS) -@plugin('reboot') +@plugin('reboot_computer') def reboot_WIN32(jarvis, s): """Reboot the system""" if s == '': From 4e948c621e127bfbe2003985769faa276c7f1e28 Mon Sep 17 00:00:00 2001 From: dinanz Date: Wed, 19 Apr 2023 13:14:05 -0400 Subject: [PATCH 5/5] fixed default font colors --- jarviscli/CmdInterpreter.py | 24 ++++++++++++------------ jarviscli/Jarvis.py | 14 +++++++------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/jarviscli/CmdInterpreter.py b/jarviscli/CmdInterpreter.py index 4af26354b..017b2e777 100644 --- a/jarviscli/CmdInterpreter.py +++ b/jarviscli/CmdInterpreter.py @@ -39,7 +39,7 @@ def say(self, text, color="", speak=True): and talk when sound is enable. :param text: the text to print (or talk) :param color: for text - use colorama (https://pypi.org/project/colorama/) - e.g. Fore.BLUE + e.g. Fore.CYAN :param speak: False-, if text shouldn't be spoken even if speech is enabled """ print(color + text + Fore.RESET, flush=True) @@ -275,7 +275,7 @@ def incorrect_option(self): A function to notify the user that an incorrect option has been entered and prompting him to enter a correct one """ - self.say("Oops! Looks like you entered an incorrect option", Fore.RED) + self.say("Oops! Looks like you entered an incorrect option", Fore.MAGENTA) self.say("Look at the options once again:", Fore.GREEN) @@ -290,7 +290,7 @@ def try_do(self, s): if self._api.is_spinner_running(): self.spinner_stop("It seems some error has occured") print( - Fore.RED + Fore.MAGENTA + "Some error occurred, please open an issue on github!") print("Here is error:") print('') @@ -346,8 +346,8 @@ def __init__( self.speech = create_voice( self, gtts_status, rate=self.speech_rate) except Exception as e: - self.say("Voice not supported", Fore.RED) - self.say(str(e), Fore.RED) + self.say("Voice not supported", Fore.MAGENTA) + self.say(str(e), Fore.MAGENTA) self.fixed_responses = {"what time is it": "clock", "where am i": "pinpoint", @@ -369,14 +369,14 @@ def _init_plugin_info(self): plugin_status_formatter = { "disabled": len(self._plugin_manager.get_disabled()), "enabled": self._plugin_manager.get_number_plugins_loaded(), - "red": Fore.RED, - "blue": Fore.BLUE, + "magenta": Fore.MAGENTA, + "cyan": Fore.CYAN, "reset": Fore.RESET } - plugin_status = "{red}{enabled} {blue}plugins loaded" + plugin_status = "{magenta}{enabled} {cyan}plugins loaded" if plugin_status_formatter['disabled'] > 0: - plugin_status += " {red}{disabled} {blue}plugins disabled. More information: {red}status\n" + plugin_status += " {magenta}{disabled} {cyan}plugins disabled. More information: {magenta}status\n" plugin_status += Fore.RESET self.first_reaction_text += plugin_status.format( @@ -428,7 +428,7 @@ def close(self): if self._api.is_spinner_running(): self._api.spinner_stop('Some error has occured') - self.say("Goodbye, see you later!", Fore.RED) + self.say("Goodbye, see you later!", Fore.MAGENTA) self.scheduler.stop_all() sys.exit() @@ -438,7 +438,7 @@ def execute_once(self, command): def error(self): """Jarvis let you know if an error has occurred.""" - self.say("I could not identify your command...", Fore.RED) + self.say("I could not identify your command...", Fore.MAGENTA) def interrupt_handler(self, signal, frame): """Closes Jarvis on SIGINT signal. (Ctrl-C)""" @@ -469,7 +469,7 @@ def do_help(self, arg): headerString = "These are valid commands for Jarvis" formatString = "Format: command ([aliases for command])" self.say(headerString) - self.say(formatString, Fore.BLUE) + self.say(formatString, Fore.CYAN) pluginDict = self._plugin_manager.get_plugins() uniquePlugins = {} for key in pluginDict.keys(): diff --git a/jarviscli/Jarvis.py b/jarviscli/Jarvis.py index dba472878..b4a87052b 100644 --- a/jarviscli/Jarvis.py +++ b/jarviscli/Jarvis.py @@ -34,17 +34,17 @@ class Jarvis(CmdInterpreter, object): # variable used at Breakpoint #1. # allows Jarvis say "Hi", only at the first interaction. first_reaction_text = "" - first_reaction_text += Fore.BLUE + \ + first_reaction_text += Fore.CYAN + \ 'Jarvis\' sound is by default disabled.' + Fore.RESET first_reaction_text += "\n" - first_reaction_text += Fore.BLUE + 'In order to let Jarvis talk out loud type: ' - first_reaction_text += Fore.RESET + Fore.RED + 'enable sound' + Fore.RESET + first_reaction_text += Fore.CYAN + 'In order to let Jarvis talk out loud type: ' + first_reaction_text += Fore.RESET + Fore.MAGENTA + 'enable sound' + Fore.RESET first_reaction_text += "\n" - first_reaction_text += Fore.BLUE + \ + first_reaction_text += Fore.CYAN + \ "Type 'help' for a list of available actions." + Fore.RESET first_reaction_text += "\n" prompt = ( - Fore.RED + Fore.MAGENTA + "{} Hi, what can I do for you?\n".format(PROMPT_CHAR) + Fore.RESET) @@ -79,7 +79,7 @@ def _rel_path_fix(self, dirs): def default(self, data): """Jarvis let's you know if an error has occurred.""" - print_say("I could not identify your command...", self, Fore.RED) + print_say("I could not identify your command...", self, Fore.MAGENTA) def precmd(self, line): """Hook that executes before every command.""" @@ -106,7 +106,7 @@ def postcmd(self, stop, line): """Hook that executes after every command.""" if self.first_reaction: self.prompt = ( - Fore.RED + Fore.MAGENTA + "{} What can I do for you?\n".format(PROMPT_CHAR) + Fore.RESET) self.first_reaction = False