diff --git a/src/fenrir-package/commands/commands/add_word_to_spell_check.py b/src/fenrir-package/commands/commands/add_word_to_spell_check.py index 7c4aee7f..2e3accf3 100644 --- a/src/fenrir-package/commands/commands/add_word_to_spell_check.py +++ b/src/fenrir-package/commands/commands/add_word_to_spell_check.py @@ -15,8 +15,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'adds the current word to the exceptions dictionary' + def run(self, environment): if not initialized: environment['runtime']['outputManager'].presentText(environment, 'pychant is not installed', interrupt=True) diff --git a/src/fenrir-package/commands/commands/clear_clipboard.py b/src/fenrir-package/commands/commands/clear_clipboard.py index ab89143c..72a42f47 100644 --- a/src/fenrir-package/commands/commands/clear_clipboard.py +++ b/src/fenrir-package/commands/commands/clear_clipboard.py @@ -11,8 +11,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'clears the currently selected clipboard' + def run(self, environment): environment['commandBuffer']['currClipboard'] = -1 del environment['commandBuffer']['clipboard'][:] diff --git a/src/fenrir-package/commands/commands/copy_marked_to_clipboard.py b/src/fenrir-package/commands/commands/copy_marked_to_clipboard.py index 51e44bf8..2320099c 100644 --- a/src/fenrir-package/commands/commands/copy_marked_to_clipboard.py +++ b/src/fenrir-package/commands/commands/copy_marked_to_clipboard.py @@ -9,8 +9,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'copies marked text to the currently selected clipboard' + def run(self, environment): if (environment['commandBuffer']['Marks']['1'] == None) or \ (environment['commandBuffer']['Marks']['2'] == None): diff --git a/src/fenrir-package/commands/commands/curr_char.py b/src/fenrir-package/commands/commands/curr_char.py index 2fa9f7b8..c83f28cb 100644 --- a/src/fenrir-package/commands/commands/curr_char.py +++ b/src/fenrir-package/commands/commands/curr_char.py @@ -8,8 +8,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'presents the current character.' + def run(self, environment): environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview'] if environment['screenData']['newCursorReview'] == None: diff --git a/src/fenrir-package/commands/commands/curr_char_phonetic.py b/src/fenrir-package/commands/commands/curr_char_phonetic.py index 21e5a954..1c7d5203 100644 --- a/src/fenrir-package/commands/commands/curr_char_phonetic.py +++ b/src/fenrir-package/commands/commands/curr_char_phonetic.py @@ -8,8 +8,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'phonetically presents the current character' + def run(self, environment): if (environment['screenData']['newCursorReview'] != None): cursorPos = environment['screenData']['newCursorReview'].copy() diff --git a/src/fenrir-package/commands/commands/curr_clipboard.py b/src/fenrir-package/commands/commands/curr_clipboard.py index 6e37b2fc..be92e027 100644 --- a/src/fenrir-package/commands/commands/curr_clipboard.py +++ b/src/fenrir-package/commands/commands/curr_clipboard.py @@ -7,8 +7,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'speaks the contents of the currently selected clipboard' + def run(self, environment): if len(environment['commandBuffer']['clipboard']) == 0: environment['runtime']['outputManager'].presentText(environment, 'clipboard empty', interrupt=True) diff --git a/src/fenrir-package/commands/commands/curr_line.py b/src/fenrir-package/commands/commands/curr_line.py index 7a241a99..849d449d 100644 --- a/src/fenrir-package/commands/commands/curr_line.py +++ b/src/fenrir-package/commands/commands/curr_line.py @@ -8,8 +8,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'current line' + def run(self, environment): environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview'] if environment['screenData']['newCursorReview'] == None: diff --git a/src/fenrir-package/commands/commands/curr_screen.py b/src/fenrir-package/commands/commands/curr_screen.py index 5c4ac8b1..9d6d9bb5 100644 --- a/src/fenrir-package/commands/commands/curr_screen.py +++ b/src/fenrir-package/commands/commands/curr_screen.py @@ -7,8 +7,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'reads the contents of the current screen' + def run(self, environment): if environment['screenData']['newContentText'].strip() == '': environment['runtime']['outputManager'].presentText(environment, "screen is empty", soundIcon='EmptyLine', interrupt=True) diff --git a/src/fenrir-package/commands/commands/curr_screen_after_cursor.py b/src/fenrir-package/commands/commands/curr_screen_after_cursor.py index 19fbdc5c..3a49c8b1 100644 --- a/src/fenrir-package/commands/commands/curr_screen_after_cursor.py +++ b/src/fenrir-package/commands/commands/curr_screen_after_cursor.py @@ -9,8 +9,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'reads from the cursor to the bottom of the screen' + def run(self, environment): # Prefer review cursor over text cursor if (environment['screenData']['newCursorReview'] != None): diff --git a/src/fenrir-package/commands/commands/curr_screen_before_cursor.py b/src/fenrir-package/commands/commands/curr_screen_before_cursor.py index 37098200..57f996c1 100644 --- a/src/fenrir-package/commands/commands/curr_screen_before_cursor.py +++ b/src/fenrir-package/commands/commands/curr_screen_before_cursor.py @@ -9,8 +9,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'Reads from the top of the screen to the cursor position' + def run(self, environment): # Prefer review cursor over text cursor if (environment['screenData']['newCursorReview'] != None): diff --git a/src/fenrir-package/commands/commands/curr_word.py b/src/fenrir-package/commands/commands/curr_word.py index af278f31..dc0015d7 100644 --- a/src/fenrir-package/commands/commands/curr_word.py +++ b/src/fenrir-package/commands/commands/curr_word.py @@ -8,8 +8,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): - return 'current word.' + def getDescription(self, environment): + return 'current word.' + def run(self, environment): environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview'] if environment['screenData']['newCursorReview'] == None: diff --git a/src/fenrir-package/commands/commands/curr_word_phonetic.py b/src/fenrir-package/commands/commands/curr_word_phonetic.py index 96dafd08..a6bd6ca1 100644 --- a/src/fenrir-package/commands/commands/curr_word_phonetic.py +++ b/src/fenrir-package/commands/commands/curr_word_phonetic.py @@ -9,8 +9,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'phonetically spells the current word' + def run(self, environment): if (environment['screenData']['newCursorReview'] != None): cursorPos = environment['screenData']['newCursorReview'].copy() diff --git a/src/fenrir-package/commands/commands/cursor_position.py b/src/fenrir-package/commands/commands/cursor_position.py index 0046e535..385f9633 100644 --- a/src/fenrir-package/commands/commands/cursor_position.py +++ b/src/fenrir-package/commands/commands/cursor_position.py @@ -8,8 +8,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'displays the position of the review cursor' + def run(self, environment): # Prefer review cursor over text cursor diff --git a/src/fenrir-package/commands/commands/date.py b/src/fenrir-package/commands/commands/date.py index f1027904..5a1584b0 100644 --- a/src/fenrir-package/commands/commands/date.py +++ b/src/fenrir-package/commands/commands/date.py @@ -9,8 +9,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'presents the date' + def run(self, environment): dateFormat = environment['runtime']['settingsManager'].getSetting(environment,'general', 'dateFormat') diff --git a/src/fenrir-package/commands/commands/dec_sound_volume.py b/src/fenrir-package/commands/commands/dec_sound_volume.py index 311e7ad7..c1517a29 100644 --- a/src/fenrir-package/commands/commands/dec_sound_volume.py +++ b/src/fenrir-package/commands/commands/dec_sound_volume.py @@ -8,8 +8,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'decrease sound volume' + def run(self, environment): value = environment['runtime']['settingsManager'].getSettingAsFloat(environment, 'sound', 'volume') diff --git a/src/fenrir-package/commands/commands/dec_speech_pitch.py b/src/fenrir-package/commands/commands/dec_speech_pitch.py index a24c3e1d..876da939 100644 --- a/src/fenrir-package/commands/commands/dec_speech_pitch.py +++ b/src/fenrir-package/commands/commands/dec_speech_pitch.py @@ -8,12 +8,11 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'decreases the pitch of the speech' + def run(self, environment): - value = environment['runtime']['settingsManager'].getSettingAsFloat(environment, 'speech', 'pitch') - value = round((math.ceil(10 * value) / 10) - 0.1, 2) if value < 0.0: value = 0.0 diff --git a/src/fenrir-package/commands/commands/dec_speech_rate.py b/src/fenrir-package/commands/commands/dec_speech_rate.py index dca501e1..fec74154 100644 --- a/src/fenrir-package/commands/commands/dec_speech_rate.py +++ b/src/fenrir-package/commands/commands/dec_speech_rate.py @@ -8,12 +8,11 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'decreases the rate of the speech' + def run(self, environment): - value = environment['runtime']['settingsManager'].getSettingAsFloat(environment, 'speech', 'rate') - value = round((math.ceil(10 * value) / 10) - 0.1, 2) if value < 0.0: value = 0.0 diff --git a/src/fenrir-package/commands/commands/dec_speech_volume.py b/src/fenrir-package/commands/commands/dec_speech_volume.py index 04bc09b9..a6362276 100644 --- a/src/fenrir-package/commands/commands/dec_speech_volume.py +++ b/src/fenrir-package/commands/commands/dec_speech_volume.py @@ -8,12 +8,11 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'decreases the volume of the speech' + def run(self, environment): - value = environment['runtime']['settingsManager'].getSettingAsFloat(environment, 'speech', 'volume') - value = round((math.ceil(10 * value) / 10) - 0.1, 2) if value < 0.1: value = 0.1 diff --git a/src/fenrir-package/commands/commands/exit_review.py b/src/fenrir-package/commands/commands/exit_review.py index 1a94e3e6..60b7d3e7 100644 --- a/src/fenrir-package/commands/commands/exit_review.py +++ b/src/fenrir-package/commands/commands/exit_review.py @@ -7,8 +7,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'exits review mode' + def run(self, environment): if (environment['screenData']['oldCursorReview'] == None) and \ (environment['screenData']['newCursorReview'] == None): diff --git a/src/fenrir-package/commands/commands/first_clipboard.py b/src/fenrir-package/commands/commands/first_clipboard.py index 900e5d88..57971984 100644 --- a/src/fenrir-package/commands/commands/first_clipboard.py +++ b/src/fenrir-package/commands/commands/first_clipboard.py @@ -11,8 +11,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'selects the first clipboard' + def run(self, environment): if len(environment['commandBuffer']['clipboard']) == 0: environment['runtime']['outputManager'].presentText(environment, 'clipboard empty', interrupt=True) diff --git a/src/fenrir-package/commands/commands/foreward_keypress.py b/src/fenrir-package/commands/commands/foreward_keypress.py index 8285d43a..92294298 100644 --- a/src/fenrir-package/commands/commands/foreward_keypress.py +++ b/src/fenrir-package/commands/commands/foreward_keypress.py @@ -7,8 +7,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'No Description found' + def run(self, environment): environment['input']['keyForeward'] = True environment['runtime']['outputManager'].presentText(environment, 'Foreward next keypress', interrupt=True) diff --git a/src/fenrir-package/commands/commands/forward_keypress.py b/src/fenrir-package/commands/commands/forward_keypress.py index 3f922a5e..903304f1 100644 --- a/src/fenrir-package/commands/commands/forward_keypress.py +++ b/src/fenrir-package/commands/commands/forward_keypress.py @@ -7,8 +7,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'sends the following keypress to the terminal' + def run(self, environment): environment['input']['keyForeward'] = True environment['runtime']['outputManager'].presentText(environment, 'Foreward next keypress', interrupt=True) diff --git a/src/fenrir-package/commands/commands/inc_sound_volume.py b/src/fenrir-package/commands/commands/inc_sound_volume.py index 7690874d..7527e72b 100644 --- a/src/fenrir-package/commands/commands/inc_sound_volume.py +++ b/src/fenrir-package/commands/commands/inc_sound_volume.py @@ -8,8 +8,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'adjusts the volume for in coming sounds' + def run(self, environment): value = environment['runtime']['settingsManager'].getSettingAsFloat(environment, 'sound', 'volume') diff --git a/src/fenrir-package/commands/commands/inc_speech_pitch.py b/src/fenrir-package/commands/commands/inc_speech_pitch.py index 5f7153d9..f66b2647 100644 --- a/src/fenrir-package/commands/commands/inc_speech_pitch.py +++ b/src/fenrir-package/commands/commands/inc_speech_pitch.py @@ -8,12 +8,11 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'increases the pitch of the speech' + def run(self, environment): - value = environment['runtime']['settingsManager'].getSettingAsFloat(environment, 'speech', 'pitch') - value = round((math.ceil(10 * value) / 10) + 0.1, 2) if value > 1.0: value = 1.0 diff --git a/src/fenrir-package/commands/commands/inc_speech_rate.py b/src/fenrir-package/commands/commands/inc_speech_rate.py index 1221fcf1..054f7b8d 100644 --- a/src/fenrir-package/commands/commands/inc_speech_rate.py +++ b/src/fenrir-package/commands/commands/inc_speech_rate.py @@ -8,12 +8,11 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'increase the speech rat' + def run(self, environment): - value = environment['runtime']['settingsManager'].getSettingAsFloat(environment, 'speech', 'rate') - value = round((math.ceil(10 * value) / 10) + 0.1, 2) if value > 1.0: value = 1.0 diff --git a/src/fenrir-package/commands/commands/inc_speech_volume.py b/src/fenrir-package/commands/commands/inc_speech_volume.py index d8f96905..f09acabc 100644 --- a/src/fenrir-package/commands/commands/inc_speech_volume.py +++ b/src/fenrir-package/commands/commands/inc_speech_volume.py @@ -8,12 +8,11 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'increase the speech volume' + def run(self, environment): - value = environment['runtime']['settingsManager'].getSettingAsFloat(environment, 'speech', 'volume') - value = round((math.ceil(10 * value) / 10) + 0.1, 2) if value > 1.0: value = 1.0 diff --git a/src/fenrir-package/commands/commands/indent_curr_line.py b/src/fenrir-package/commands/commands/indent_curr_line.py index 40c386df..88498d8c 100644 --- a/src/fenrir-package/commands/commands/indent_curr_line.py +++ b/src/fenrir-package/commands/commands/indent_curr_line.py @@ -8,8 +8,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'shows the indention level for the current line' + def run(self, environment): # Prefer review cursor over text cursor diff --git a/src/fenrir-package/commands/commands/last_clipboard.py b/src/fenrir-package/commands/commands/last_clipboard.py index 193c928a..01d94fb4 100644 --- a/src/fenrir-package/commands/commands/last_clipboard.py +++ b/src/fenrir-package/commands/commands/last_clipboard.py @@ -11,8 +11,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'selects the last clipboard' + def run(self, environment): if len(environment['commandBuffer']['clipboard']) == 0: environment['runtime']['outputManager'].presentText(environment, 'clipboard empty', interrupt=True) diff --git a/src/fenrir-package/commands/commands/last_incomming.py b/src/fenrir-package/commands/commands/last_incomming.py index 4ba92f61..34b90d9f 100644 --- a/src/fenrir-package/commands/commands/last_incomming.py +++ b/src/fenrir-package/commands/commands/last_incomming.py @@ -7,8 +7,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'displays the last received text' + def run(self, environment): environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newDelta'], interrupt=True) return environment diff --git a/src/fenrir-package/commands/commands/linux_paste_clipboard.py b/src/fenrir-package/commands/commands/linux_paste_clipboard.py index fd6a71fe..e6495725 100644 --- a/src/fenrir-package/commands/commands/linux_paste_clipboard.py +++ b/src/fenrir-package/commands/commands/linux_paste_clipboard.py @@ -11,8 +11,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'pastes the text from the currently selected clipboard' + def run(self, environment): currClipboard = environment['commandBuffer']['currClipboard'] if currClipboard < 0: diff --git a/src/fenrir-package/commands/commands/marked_text.py b/src/fenrir-package/commands/commands/marked_text.py index 1fb5c2fc..eabf5803 100644 --- a/src/fenrir-package/commands/commands/marked_text.py +++ b/src/fenrir-package/commands/commands/marked_text.py @@ -8,8 +8,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'speaks the currently selected text that will be copied to the clipboard' + def run(self, environment): if (environment['commandBuffer']['Marks']['1'] == None) or \ (environment['commandBuffer']['Marks']['2'] == None): diff --git a/src/fenrir-package/commands/commands/next_char.py b/src/fenrir-package/commands/commands/next_char.py index 35a1fc7f..e30805fa 100644 --- a/src/fenrir-package/commands/commands/next_char.py +++ b/src/fenrir-package/commands/commands/next_char.py @@ -8,8 +8,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'moves review to the next character and presents it' + def run(self, environment): environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview'] if environment['screenData']['newCursorReview'] == None: diff --git a/src/fenrir-package/commands/commands/next_clipboard.py b/src/fenrir-package/commands/commands/next_clipboard.py index 93d06213..7e882c0a 100644 --- a/src/fenrir-package/commands/commands/next_clipboard.py +++ b/src/fenrir-package/commands/commands/next_clipboard.py @@ -11,8 +11,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'selects the next clipboard' + def run(self, environment): if len(environment['commandBuffer']['clipboard']) == 0: environment['runtime']['outputManager'].presentText(environment, 'clipboard empty', interrupt=True) diff --git a/src/fenrir-package/commands/commands/next_line.py b/src/fenrir-package/commands/commands/next_line.py index 366ddfc7..692e6e10 100644 --- a/src/fenrir-package/commands/commands/next_line.py +++ b/src/fenrir-package/commands/commands/next_line.py @@ -8,8 +8,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'moves review to the next line and presents it' + def run(self, environment): environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview'] if environment['screenData']['newCursorReview'] == None: diff --git a/src/fenrir-package/commands/commands/next_word.py b/src/fenrir-package/commands/commands/next_word.py index 5754f8b9..0db59e0b 100644 --- a/src/fenrir-package/commands/commands/next_word.py +++ b/src/fenrir-package/commands/commands/next_word.py @@ -8,8 +8,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'moves review to the next word and presents it' + def run(self, environment): environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview'] if environment['screenData']['newCursorReview'] == None: diff --git a/src/fenrir-package/commands/commands/prev_char.py b/src/fenrir-package/commands/commands/prev_char.py index 33993117..97c2981a 100644 --- a/src/fenrir-package/commands/commands/prev_char.py +++ b/src/fenrir-package/commands/commands/prev_char.py @@ -8,8 +8,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'moves review to the previous character and presents it' + def run(self, environment): environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview'] if environment['screenData']['newCursorReview'] == None: diff --git a/src/fenrir-package/commands/commands/prev_clipboard.py b/src/fenrir-package/commands/commands/prev_clipboard.py index 37fbe5ba..40af0eb4 100644 --- a/src/fenrir-package/commands/commands/prev_clipboard.py +++ b/src/fenrir-package/commands/commands/prev_clipboard.py @@ -11,8 +11,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'selects the previous clipboard' + def run(self, environment): if len(environment['commandBuffer']['clipboard']) == 0: environment['runtime']['outputManager'].presentText(environment, 'clipboard empty', interrupt=True) diff --git a/src/fenrir-package/commands/commands/prev_line.py b/src/fenrir-package/commands/commands/prev_line.py index 6573aa8c..197b4ea8 100644 --- a/src/fenrir-package/commands/commands/prev_line.py +++ b/src/fenrir-package/commands/commands/prev_line.py @@ -8,8 +8,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'moves review to the previous line and presents it' + def run(self, environment): environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview'] if environment['screenData']['newCursorReview'] == None: diff --git a/src/fenrir-package/commands/commands/prev_word.py b/src/fenrir-package/commands/commands/prev_word.py index d20d8ba1..dcd0158d 100644 --- a/src/fenrir-package/commands/commands/prev_word.py +++ b/src/fenrir-package/commands/commands/prev_word.py @@ -8,8 +8,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'moves review focus to the previous word and presents it' + def run(self, environment): environment['screenData']['oldCursorReview'] = environment['screenData']['newCursorReview'] if environment['screenData']['newCursorReview'] == None: diff --git a/src/fenrir-package/commands/commands/quit_fenrir.py b/src/fenrir-package/commands/commands/quit_fenrir.py index 0060efe5..fdd57e15 100644 --- a/src/fenrir-package/commands/commands/quit_fenrir.py +++ b/src/fenrir-package/commands/commands/quit_fenrir.py @@ -7,8 +7,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'exits Fenrir' + def run(self, environment): environment['generalInformation']['running'] = False return environment diff --git a/src/fenrir-package/commands/commands/remove_marks.py b/src/fenrir-package/commands/commands/remove_marks.py index d1c22fd6..b2cce8c9 100644 --- a/src/fenrir-package/commands/commands/remove_marks.py +++ b/src/fenrir-package/commands/commands/remove_marks.py @@ -7,8 +7,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'removes marks from selected text' + def run(self, environment): environment['commandBuffer']['Marks']['1'] = None environment['commandBuffer']['Marks']['2'] = None diff --git a/src/fenrir-package/commands/commands/remove_word_from_spell_check.py b/src/fenrir-package/commands/commands/remove_word_from_spell_check.py index 00f50ee6..891609e7 100644 --- a/src/fenrir-package/commands/commands/remove_word_from_spell_check.py +++ b/src/fenrir-package/commands/commands/remove_word_from_spell_check.py @@ -15,8 +15,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'removes the current word from the exceptions dictionary' + def run(self, environment): if not initialized: environment['runtime']['outputManager'].presentText(environment, 'pychant is not installed', interrupt=True) diff --git a/src/fenrir-package/commands/commands/review_bottom.py b/src/fenrir-package/commands/commands/review_bottom.py index 300e70a7..07f641dd 100644 --- a/src/fenrir-package/commands/commands/review_bottom.py +++ b/src/fenrir-package/commands/commands/review_bottom.py @@ -7,8 +7,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'move review to bottom of screen' + def run(self, environment): environment['screenData']['newCursorReview'] = { 'x': 0, 'y':environment['screenData']['lines']} environment['runtime']['outputManager'].presentText(environment, "Bottom", interrupt=True) diff --git a/src/fenrir-package/commands/commands/review_top.py b/src/fenrir-package/commands/commands/review_top.py index 050a8dac..9bc94c16 100644 --- a/src/fenrir-package/commands/commands/review_top.py +++ b/src/fenrir-package/commands/commands/review_top.py @@ -8,8 +8,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'move review to top of screen' + def run(self, environment): environment['screenData']['newCursorReview'] = {'x':0,'y':0} diff --git a/src/fenrir-package/commands/commands/set_mark.py b/src/fenrir-package/commands/commands/set_mark.py index ae6382da..4b6059b1 100644 --- a/src/fenrir-package/commands/commands/set_mark.py +++ b/src/fenrir-package/commands/commands/set_mark.py @@ -7,8 +7,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'places marks to select text to copy to the clipboard' + def run(self, environment): if environment['screenData']['newCursorReview'] == None: environment['runtime']['outputManager'].presentText(environment, 'no review cursor', interrupt=True) diff --git a/src/fenrir-package/commands/commands/shut_up.py b/src/fenrir-package/commands/commands/shut_up.py index 23b4d85e..cb9c3968 100644 --- a/src/fenrir-package/commands/commands/shut_up.py +++ b/src/fenrir-package/commands/commands/shut_up.py @@ -7,8 +7,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'interrupts the current presentation' + def run(self, environment): environment['runtime']['outputManager'].interruptOutput(environment) def setCallback(self, callback): diff --git a/src/fenrir-package/commands/commands/spell_check.py b/src/fenrir-package/commands/commands/spell_check.py index c270a6e5..fb1bd083 100644 --- a/src/fenrir-package/commands/commands/spell_check.py +++ b/src/fenrir-package/commands/commands/spell_check.py @@ -15,8 +15,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'checks the spelling of the current word' + def run(self, environment): if not initialized: environment['runtime']['outputManager'].presentText(environment, 'pychant is not installed', interrupt=True) diff --git a/src/fenrir-package/commands/commands/time.py b/src/fenrir-package/commands/commands/time.py index 5f889490..49bcade2 100644 --- a/src/fenrir-package/commands/commands/time.py +++ b/src/fenrir-package/commands/commands/time.py @@ -9,8 +9,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'presents the time' + def run(self, environment): timeFormat = environment['runtime']['settingsManager'].getSetting(environment,'general', 'timeFormat') diff --git a/src/fenrir-package/commands/commands/toggle_auto_read.py b/src/fenrir-package/commands/commands/toggle_auto_read.py index dbd953fa..3339d83a 100644 --- a/src/fenrir-package/commands/commands/toggle_auto_read.py +++ b/src/fenrir-package/commands/commands/toggle_auto_read.py @@ -7,10 +7,10 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'enables or disables automatic reading of new text as it appears' + def run(self, environment): - environment = environment['runtime']['settingsManager'].setSetting(environment, 'speech', 'autoReadIncomming', str(not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'autoReadIncomming'))) if environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'autoReadIncomming'): environment['runtime']['outputManager'].presentText(environment, "autoread enabled", soundIcon='', interrupt=True) diff --git a/src/fenrir-package/commands/commands/toggle_auto_spell_check.py b/src/fenrir-package/commands/commands/toggle_auto_spell_check.py index f57e6961..acb0d039 100644 --- a/src/fenrir-package/commands/commands/toggle_auto_spell_check.py +++ b/src/fenrir-package/commands/commands/toggle_auto_spell_check.py @@ -7,8 +7,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'enables or disables automatic spell checking' + def run(self, environment): environment = environment['runtime']['settingsManager'].setSetting(environment, 'general', 'autoSpellCheck', str(not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'general', 'autoSpellCheck'))) if environment['runtime']['settingsManager'].getSettingAsBool(environment, 'general', 'autoSpellCheck'): diff --git a/src/fenrir-package/commands/commands/toggle_braille.py b/src/fenrir-package/commands/commands/toggle_braille.py index d437c90b..7145a79e 100644 --- a/src/fenrir-package/commands/commands/toggle_braille.py +++ b/src/fenrir-package/commands/commands/toggle_braille.py @@ -7,10 +7,10 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'enables and disables output in braille' + def run(self, environment): - if environment['runtime']['settingsManager'].getSettingAsBool(environment, 'braille', 'enabled'): environment['runtime']['outputManager'].presentText(environment, "braille disabled", soundIcon='BrailleOff', interrupt=True) environment = environment['runtime']['settingsManager'].setSetting(environment, 'braille', 'enabled', str(not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'braille', 'enabled'))) diff --git a/src/fenrir-package/commands/commands/toggle_output.py b/src/fenrir-package/commands/commands/toggle_output.py index 0818fc34..d0ab5d03 100644 --- a/src/fenrir-package/commands/commands/toggle_output.py +++ b/src/fenrir-package/commands/commands/toggle_output.py @@ -7,8 +7,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'toggles all output settings' + def run(self, environment): if environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'enabled') or \ environment['runtime']['settingsManager'].getSettingAsBool(environment, 'sound', 'enabled') or \ diff --git a/src/fenrir-package/commands/commands/toggle_sound.py b/src/fenrir-package/commands/commands/toggle_sound.py index 5ed12d9e..b4e4d501 100644 --- a/src/fenrir-package/commands/commands/toggle_sound.py +++ b/src/fenrir-package/commands/commands/toggle_sound.py @@ -7,10 +7,10 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'enables or disables sound' + def run(self, environment): - if environment['runtime']['settingsManager'].getSettingAsBool(environment, 'sound', 'enabled'): environment['runtime']['outputManager'].presentText(environment, "sound disabled", soundIcon='SoundOff', interrupt=True) environment = environment['runtime']['settingsManager'].setSetting(environment, 'sound', 'enabled', str(not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'sound', 'enabled'))) diff --git a/src/fenrir-package/commands/commands/toggle_speech.py b/src/fenrir-package/commands/commands/toggle_speech.py index 98ec3a8d..5179b730 100644 --- a/src/fenrir-package/commands/commands/toggle_speech.py +++ b/src/fenrir-package/commands/commands/toggle_speech.py @@ -7,10 +7,10 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'enables or disables speech' + def run(self, environment): - if environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'enabled'): environment['runtime']['outputManager'].presentText(environment, "speech disabled", soundIcon='SpeechOff', interrupt=True) environment = environment['runtime']['settingsManager'].setSetting(environment, 'speech', 'enabled', str(not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'enabled'))) diff --git a/src/fenrir-package/core/commandManager.py b/src/fenrir-package/core/commandManager.py index 6cd0b792..f21a071d 100644 --- a/src/fenrir-package/core/commandManager.py +++ b/src/fenrir-package/core/commandManager.py @@ -54,7 +54,7 @@ class commandManager(): if self.commandExists(environment, command, section): try: if environment['generalInformation']['tutorialMode']: - environment['commands'][section][command].getDescription() + environment['commands'][section][command].getDescription(environment) else: environment['commands'][section][command].run(environment) except Exception as e: