From 010b9b4e067576ffb5faf231059dd62c516816c5 Mon Sep 17 00:00:00 2001 From: chrys Date: Mon, 19 Sep 2016 22:15:58 +0200 Subject: [PATCH] finish remove unneeded returns, import debug to everything, add header --- src/fenrir-package/braille/braille.py | 6 ++++++ src/fenrir-package/commands/command_template.py | 7 ++++++- .../commands/commands/add_word_to_spell_check.py | 6 ++++++ .../commands/commands/clear_clipboard.py | 6 ++++++ .../commands/commands/copy_marked_to_clipboard.py | 5 +++++ src/fenrir-package/commands/commands/curr_char.py | 6 ++++++ .../commands/commands/curr_char_phonetic.py | 6 ++++++ .../commands/commands/curr_clipboard.py | 6 ++++++ src/fenrir-package/commands/commands/curr_line.py | 6 ++++++ src/fenrir-package/commands/commands/curr_screen.py | 6 ++++++ .../commands/commands/curr_screen_after_cursor.py | 5 +++++ .../commands/commands/curr_screen_before_cursor.py | 5 +++++ src/fenrir-package/commands/commands/curr_word.py | 6 ++++++ .../commands/commands/curr_word_phonetic.py | 6 ++++++ .../commands/commands/cursor_position.py | 5 +++++ src/fenrir-package/commands/commands/date.py | 5 +++++ .../commands/commands/dec_sound_volume.py | 6 ++++++ .../commands/commands/dec_speech_pitch.py | 6 ++++++ .../commands/commands/dec_speech_rate.py | 6 ++++++ .../commands/commands/dec_speech_volume.py | 6 ++++++ src/fenrir-package/commands/commands/exit_review.py | 6 ++++++ .../commands/commands/first_clipboard.py | 8 +++++--- .../commands/commands/forward_keypress.py | 6 ++++++ .../commands/commands/inc_sound_volume.py | 6 ++++++ .../commands/commands/inc_speech_pitch.py | 6 ++++++ .../commands/commands/inc_speech_rate.py | 6 ++++++ .../commands/commands/inc_speech_volume.py | 6 ++++++ .../commands/commands/indent_curr_line.py | 6 ++++++ .../commands/commands/last_clipboard.py | 8 +++++--- .../commands/commands/last_incomming.py | 6 ++++++ .../commands/commands/linux_paste_clipboard.py | 9 +++++++-- src/fenrir-package/commands/commands/marked_text.py | 6 ++++++ src/fenrir-package/commands/commands/next_char.py | 6 ++++++ .../commands/commands/next_clipboard.py | 8 +++++--- src/fenrir-package/commands/commands/next_line.py | 6 ++++++ src/fenrir-package/commands/commands/next_word.py | 6 ++++++ src/fenrir-package/commands/commands/prev_char.py | 6 ++++++ .../commands/commands/prev_clipboard.py | 8 +++++--- src/fenrir-package/commands/commands/prev_line.py | 6 ++++++ src/fenrir-package/commands/commands/prev_word.py | 6 ++++++ src/fenrir-package/commands/commands/quit_fenrir.py | 6 ++++++ src/fenrir-package/commands/commands/remove_marks.py | 6 ++++++ .../commands/commands/remove_word_from_spell_check.py | 10 ++++++++-- src/fenrir-package/commands/commands/review_bottom.py | 6 ++++++ src/fenrir-package/commands/commands/review_top.py | 6 ++++++ src/fenrir-package/commands/commands/set_mark.py | 6 ++++++ src/fenrir-package/commands/commands/shut_up.py | 6 ++++++ src/fenrir-package/commands/commands/spell_check.py | 6 ++++++ src/fenrir-package/commands/commands/time.py | 5 +++++ .../commands/commands/toggle_auto_read.py | 5 +++++ .../commands/commands/toggle_auto_spell_check.py | 6 ++++++ .../commands/commands/toggle_braille.py | 6 ++++++ src/fenrir-package/commands/commands/toggle_output.py | 6 ++++++ src/fenrir-package/commands/commands/toggle_sound.py | 6 ++++++ src/fenrir-package/commands/commands/toggle_speech.py | 6 ++++++ .../commands/commands/toggle_tutorial_mode.py | 6 ++++++ src/fenrir-package/commands/onInput/10000-shut_up.py | 6 ++++++ .../54000-present_char_if_cursor_change_horizontal.py | 8 +++++++- .../55000-present_line_if_cursor_change_vertical.py | 6 ++++++ .../commands/onScreenChanged/50000-char_echo.py | 6 ++++++ .../commands/onScreenChanged/60000-word_echo.py | 6 ++++++ .../commands/onScreenChanged/62000-spell_check.py | 6 ++++++ .../onScreenChanged/65000-char_delete_echo.py | 6 ++++++ .../commands/onScreenChanged/70000-incomming.py | 6 ++++++ .../onScreenChanged/75000-incomming_promote.py | 6 ++++++ .../80000-screen_change_announcement.py | 6 ++++++ .../85000-screen_chnage_reset_marks.py | 6 ++++++ .../88000-screen_chnage_leve_review_mode.py | 6 ++++++ src/fenrir-package/core/commandManager.py | 7 ++++++- src/fenrir-package/core/commands.py | 6 ++++++ src/fenrir-package/{utils => core}/debug.py | 0 src/fenrir-package/core/environment.py | 5 +++++ src/fenrir-package/core/generalInformation.py | 6 ++++++ src/fenrir-package/core/inputEvent.py | 6 ++++++ src/fenrir-package/core/inputManager.py | 6 +++++- src/fenrir-package/core/outputManager.py | 7 ++++++- src/fenrir-package/core/runtime.py | 6 ++++++ src/fenrir-package/core/screenData.py | 5 +++++ src/fenrir-package/core/screenManager.py | 7 ++++++- src/fenrir-package/core/settings.py | 6 +++++- src/fenrir-package/core/settingsManager.py | 6 +++++- src/fenrir-package/fenrir.py | 2 +- src/fenrir-package/inputDriver/evdev.py | 8 ++++++-- src/fenrir-package/screenDriver/linux.py | 9 ++++++--- src/fenrir-package/soundDriver/generic.py | 6 ++++++ src/fenrir-package/soundDriver/gstreamer.py | 7 +++++++ src/fenrir-package/speechDriver/espeak.py | 5 +++++ src/fenrir-package/speechDriver/generic.py | 5 +++++ src/fenrir-package/speechDriver/speechd.py | 11 ++++++++--- src/fenrir-package/utils/char_utils.py | 6 ++++++ src/fenrir-package/utils/line_utils.py | 6 ++++++ src/fenrir-package/utils/mark_utils.py | 6 ++++++ src/fenrir-package/utils/review_utils.py | 5 +++++ src/fenrir-package/utils/word_utils.py | 6 ++++++ 94 files changed, 541 insertions(+), 33 deletions(-) rename src/fenrir-package/{utils => core}/debug.py (100%) diff --git a/src/fenrir-package/braille/braille.py b/src/fenrir-package/braille/braille.py index a0a297f7..0358d590 100644 --- a/src/fenrir-package/braille/braille.py +++ b/src/fenrir-package/braille/braille.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class braille(): def __init__(self): diff --git a/src/fenrir-package/commands/command_template.py b/src/fenrir-package/commands/command_template.py index 8b97e071..51f7760e 100644 --- a/src/fenrir-package/commands/command_template.py +++ b/src/fenrir-package/commands/command_template.py @@ -1,5 +1,10 @@ #!/bin/python -from utils import debug +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): 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 8d09d762..74495b5b 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 @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug from utils import word_utils initialized = False try: diff --git a/src/fenrir-package/commands/commands/clear_clipboard.py b/src/fenrir-package/commands/commands/clear_clipboard.py index 61b35d28..f68bb380 100644 --- a/src/fenrir-package/commands/commands/clear_clipboard.py +++ b/src/fenrir-package/commands/commands/clear_clipboard.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): 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 f6bb6e51..96d18cc6 100644 --- a/src/fenrir-package/commands/commands/copy_marked_to_clipboard.py +++ b/src/fenrir-package/commands/commands/copy_marked_to_clipboard.py @@ -1,5 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug from utils import mark_utils class command(): diff --git a/src/fenrir-package/commands/commands/curr_char.py b/src/fenrir-package/commands/commands/curr_char.py index 0882ec5a..168c91df 100644 --- a/src/fenrir-package/commands/commands/curr_char.py +++ b/src/fenrir-package/commands/commands/curr_char.py @@ -1,5 +1,11 @@ #!/bin/python from utils import char_utils +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/commands/curr_char_phonetic.py b/src/fenrir-package/commands/commands/curr_char_phonetic.py index 864411f1..fa260dd2 100644 --- a/src/fenrir-package/commands/commands/curr_char_phonetic.py +++ b/src/fenrir-package/commands/commands/curr_char_phonetic.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug from utils import char_utils class command(): diff --git a/src/fenrir-package/commands/commands/curr_clipboard.py b/src/fenrir-package/commands/commands/curr_clipboard.py index 2211f594..44bd3de0 100644 --- a/src/fenrir-package/commands/commands/curr_clipboard.py +++ b/src/fenrir-package/commands/commands/curr_clipboard.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/commands/curr_line.py b/src/fenrir-package/commands/commands/curr_line.py index e16e5395..51836f11 100644 --- a/src/fenrir-package/commands/commands/curr_line.py +++ b/src/fenrir-package/commands/commands/curr_line.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug from utils import line_utils class command(): diff --git a/src/fenrir-package/commands/commands/curr_screen.py b/src/fenrir-package/commands/commands/curr_screen.py index 37b303bc..96a7a12b 100644 --- a/src/fenrir-package/commands/commands/curr_screen.py +++ b/src/fenrir-package/commands/commands/curr_screen.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): 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 eff88c14..3500a2da 100644 --- a/src/fenrir-package/commands/commands/curr_screen_after_cursor.py +++ b/src/fenrir-package/commands/commands/curr_screen_after_cursor.py @@ -1,5 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug from utils import mark_utils class command(): 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 b88e3a18..433dfb0c 100644 --- a/src/fenrir-package/commands/commands/curr_screen_before_cursor.py +++ b/src/fenrir-package/commands/commands/curr_screen_before_cursor.py @@ -1,5 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug from utils import mark_utils class command(): diff --git a/src/fenrir-package/commands/commands/curr_word.py b/src/fenrir-package/commands/commands/curr_word.py index fde9d509..238ef415 100644 --- a/src/fenrir-package/commands/commands/curr_word.py +++ b/src/fenrir-package/commands/commands/curr_word.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug from utils import word_utils class command(): diff --git a/src/fenrir-package/commands/commands/curr_word_phonetic.py b/src/fenrir-package/commands/commands/curr_word_phonetic.py index 373aef85..3658cf2e 100644 --- a/src/fenrir-package/commands/commands/curr_word_phonetic.py +++ b/src/fenrir-package/commands/commands/curr_word_phonetic.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug from utils import word_utils from utils import char_utils diff --git a/src/fenrir-package/commands/commands/cursor_position.py b/src/fenrir-package/commands/commands/cursor_position.py index 23068e08..158223b3 100644 --- a/src/fenrir-package/commands/commands/cursor_position.py +++ b/src/fenrir-package/commands/commands/cursor_position.py @@ -1,5 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/commands/date.py b/src/fenrir-package/commands/commands/date.py index ae59e8f2..44334955 100644 --- a/src/fenrir-package/commands/commands/date.py +++ b/src/fenrir-package/commands/commands/date.py @@ -1,5 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug import datetime class command(): diff --git a/src/fenrir-package/commands/commands/dec_sound_volume.py b/src/fenrir-package/commands/commands/dec_sound_volume.py index 9f0586d9..979d2a1b 100644 --- a/src/fenrir-package/commands/commands/dec_sound_volume.py +++ b/src/fenrir-package/commands/commands/dec_sound_volume.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug import math class command(): diff --git a/src/fenrir-package/commands/commands/dec_speech_pitch.py b/src/fenrir-package/commands/commands/dec_speech_pitch.py index 0360d0f3..f4a0e999 100644 --- a/src/fenrir-package/commands/commands/dec_speech_pitch.py +++ b/src/fenrir-package/commands/commands/dec_speech_pitch.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug import math class command(): diff --git a/src/fenrir-package/commands/commands/dec_speech_rate.py b/src/fenrir-package/commands/commands/dec_speech_rate.py index b3c2455a..c300403a 100644 --- a/src/fenrir-package/commands/commands/dec_speech_rate.py +++ b/src/fenrir-package/commands/commands/dec_speech_rate.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug import math class command(): diff --git a/src/fenrir-package/commands/commands/dec_speech_volume.py b/src/fenrir-package/commands/commands/dec_speech_volume.py index 94760bc7..0c08683c 100644 --- a/src/fenrir-package/commands/commands/dec_speech_volume.py +++ b/src/fenrir-package/commands/commands/dec_speech_volume.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug import math class command(): diff --git a/src/fenrir-package/commands/commands/exit_review.py b/src/fenrir-package/commands/commands/exit_review.py index eb8e24f8..4c9e75bc 100644 --- a/src/fenrir-package/commands/commands/exit_review.py +++ b/src/fenrir-package/commands/commands/exit_review.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/commands/first_clipboard.py b/src/fenrir-package/commands/commands/first_clipboard.py index ee1a8950..b6d4c066 100644 --- a/src/fenrir-package/commands/commands/first_clipboard.py +++ b/src/fenrir-package/commands/commands/first_clipboard.py @@ -1,8 +1,10 @@ #!/bin/python -import fcntl -import sys -import termios +# -*- coding: utf-8 -*- +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/commands/forward_keypress.py b/src/fenrir-package/commands/commands/forward_keypress.py index 0a2025ed..49815d60 100644 --- a/src/fenrir-package/commands/commands/forward_keypress.py +++ b/src/fenrir-package/commands/commands/forward_keypress.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/commands/inc_sound_volume.py b/src/fenrir-package/commands/commands/inc_sound_volume.py index 3728d72b..1fbc3993 100644 --- a/src/fenrir-package/commands/commands/inc_sound_volume.py +++ b/src/fenrir-package/commands/commands/inc_sound_volume.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug import math class command(): diff --git a/src/fenrir-package/commands/commands/inc_speech_pitch.py b/src/fenrir-package/commands/commands/inc_speech_pitch.py index eeeba161..767dc61f 100644 --- a/src/fenrir-package/commands/commands/inc_speech_pitch.py +++ b/src/fenrir-package/commands/commands/inc_speech_pitch.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug import math class command(): diff --git a/src/fenrir-package/commands/commands/inc_speech_rate.py b/src/fenrir-package/commands/commands/inc_speech_rate.py index 63151e11..d504777a 100644 --- a/src/fenrir-package/commands/commands/inc_speech_rate.py +++ b/src/fenrir-package/commands/commands/inc_speech_rate.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug import math class command(): diff --git a/src/fenrir-package/commands/commands/inc_speech_volume.py b/src/fenrir-package/commands/commands/inc_speech_volume.py index d626015e..4606d636 100644 --- a/src/fenrir-package/commands/commands/inc_speech_volume.py +++ b/src/fenrir-package/commands/commands/inc_speech_volume.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug import math class command(): diff --git a/src/fenrir-package/commands/commands/indent_curr_line.py b/src/fenrir-package/commands/commands/indent_curr_line.py index 5a4353c2..4545b07d 100644 --- a/src/fenrir-package/commands/commands/indent_curr_line.py +++ b/src/fenrir-package/commands/commands/indent_curr_line.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug from utils import line_utils class command(): diff --git a/src/fenrir-package/commands/commands/last_clipboard.py b/src/fenrir-package/commands/commands/last_clipboard.py index f917efe5..ab7e3ccd 100644 --- a/src/fenrir-package/commands/commands/last_clipboard.py +++ b/src/fenrir-package/commands/commands/last_clipboard.py @@ -1,8 +1,10 @@ #!/bin/python -import fcntl -import sys -import termios +# -*- coding: utf-8 -*- +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/commands/last_incomming.py b/src/fenrir-package/commands/commands/last_incomming.py index a20a61a2..2e3ef78c 100644 --- a/src/fenrir-package/commands/commands/last_incomming.py +++ b/src/fenrir-package/commands/commands/last_incomming.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/commands/linux_paste_clipboard.py b/src/fenrir-package/commands/commands/linux_paste_clipboard.py index 1e19725a..9f54ad8d 100644 --- a/src/fenrir-package/commands/commands/linux_paste_clipboard.py +++ b/src/fenrir-package/commands/commands/linux_paste_clipboard.py @@ -1,8 +1,13 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug import fcntl -import sys import termios -import time +import time, sys class command(): def __init__(self): diff --git a/src/fenrir-package/commands/commands/marked_text.py b/src/fenrir-package/commands/commands/marked_text.py index 39af0bd0..49e280d7 100644 --- a/src/fenrir-package/commands/commands/marked_text.py +++ b/src/fenrir-package/commands/commands/marked_text.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug from utils import mark_utils class command(): diff --git a/src/fenrir-package/commands/commands/next_char.py b/src/fenrir-package/commands/commands/next_char.py index 8acb0e0c..abdca2dd 100644 --- a/src/fenrir-package/commands/commands/next_char.py +++ b/src/fenrir-package/commands/commands/next_char.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug from utils import char_utils class command(): diff --git a/src/fenrir-package/commands/commands/next_clipboard.py b/src/fenrir-package/commands/commands/next_clipboard.py index f30a8855..0d4b2940 100644 --- a/src/fenrir-package/commands/commands/next_clipboard.py +++ b/src/fenrir-package/commands/commands/next_clipboard.py @@ -1,8 +1,10 @@ #!/bin/python -import fcntl -import sys -import termios +# -*- coding: utf-8 -*- +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/commands/next_line.py b/src/fenrir-package/commands/commands/next_line.py index fe8d9362..2d49fe6c 100644 --- a/src/fenrir-package/commands/commands/next_line.py +++ b/src/fenrir-package/commands/commands/next_line.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug from utils import line_utils class command(): diff --git a/src/fenrir-package/commands/commands/next_word.py b/src/fenrir-package/commands/commands/next_word.py index cf90d1ba..7513759f 100644 --- a/src/fenrir-package/commands/commands/next_word.py +++ b/src/fenrir-package/commands/commands/next_word.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug from utils import word_utils class command(): diff --git a/src/fenrir-package/commands/commands/prev_char.py b/src/fenrir-package/commands/commands/prev_char.py index cc78a10d..ddbdceab 100644 --- a/src/fenrir-package/commands/commands/prev_char.py +++ b/src/fenrir-package/commands/commands/prev_char.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug from utils import char_utils class command(): diff --git a/src/fenrir-package/commands/commands/prev_clipboard.py b/src/fenrir-package/commands/commands/prev_clipboard.py index 452bcaee..46130c31 100644 --- a/src/fenrir-package/commands/commands/prev_clipboard.py +++ b/src/fenrir-package/commands/commands/prev_clipboard.py @@ -1,8 +1,10 @@ #!/bin/python -import fcntl -import sys -import termios +# -*- coding: utf-8 -*- +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/commands/prev_line.py b/src/fenrir-package/commands/commands/prev_line.py index b71a98fa..5bd8c877 100644 --- a/src/fenrir-package/commands/commands/prev_line.py +++ b/src/fenrir-package/commands/commands/prev_line.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug from utils import line_utils class command(): diff --git a/src/fenrir-package/commands/commands/prev_word.py b/src/fenrir-package/commands/commands/prev_word.py index 04473657..12c6d2c4 100644 --- a/src/fenrir-package/commands/commands/prev_word.py +++ b/src/fenrir-package/commands/commands/prev_word.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug from utils import word_utils class command(): diff --git a/src/fenrir-package/commands/commands/quit_fenrir.py b/src/fenrir-package/commands/commands/quit_fenrir.py index eb9e16ea..436f4ec7 100644 --- a/src/fenrir-package/commands/commands/quit_fenrir.py +++ b/src/fenrir-package/commands/commands/quit_fenrir.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/commands/remove_marks.py b/src/fenrir-package/commands/commands/remove_marks.py index a76f6193..f4b68dd2 100644 --- a/src/fenrir-package/commands/commands/remove_marks.py +++ b/src/fenrir-package/commands/commands/remove_marks.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): 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 d6ae4f99..139571bf 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 @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug from utils import word_utils initialized = False try: @@ -24,12 +30,12 @@ class command(): def run(self, environment): if not initialized: environment['runtime']['outputManager'].presentText(environment, 'pychant is not installed', interrupt=True) - return environment + return if environment['runtime']['settingsManager'].getSetting(environment, 'general', 'spellCheckLanguage') != self.language: try: self.updateSpellLanguage(environment) except: - return environment + return if (environment['screenData']['newCursorReview'] != None): cursorPos = environment['screenData']['newCursorReview'].copy() diff --git a/src/fenrir-package/commands/commands/review_bottom.py b/src/fenrir-package/commands/commands/review_bottom.py index 4b303c27..addfcaf8 100644 --- a/src/fenrir-package/commands/commands/review_bottom.py +++ b/src/fenrir-package/commands/commands/review_bottom.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/commands/review_top.py b/src/fenrir-package/commands/commands/review_top.py index 3647f030..c7776ac4 100644 --- a/src/fenrir-package/commands/commands/review_top.py +++ b/src/fenrir-package/commands/commands/review_top.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug from utils import char_utils class command(): diff --git a/src/fenrir-package/commands/commands/set_mark.py b/src/fenrir-package/commands/commands/set_mark.py index ed0e3ad6..acc5a113 100644 --- a/src/fenrir-package/commands/commands/set_mark.py +++ b/src/fenrir-package/commands/commands/set_mark.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/commands/shut_up.py b/src/fenrir-package/commands/commands/shut_up.py index 0d530174..a533087e 100644 --- a/src/fenrir-package/commands/commands/shut_up.py +++ b/src/fenrir-package/commands/commands/shut_up.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/commands/spell_check.py b/src/fenrir-package/commands/commands/spell_check.py index e0fdc2a9..e4ea4c53 100644 --- a/src/fenrir-package/commands/commands/spell_check.py +++ b/src/fenrir-package/commands/commands/spell_check.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug from utils import word_utils initialized = False try: diff --git a/src/fenrir-package/commands/commands/time.py b/src/fenrir-package/commands/commands/time.py index 3449eef9..5dd71f75 100644 --- a/src/fenrir-package/commands/commands/time.py +++ b/src/fenrir-package/commands/commands/time.py @@ -1,5 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug import datetime class command(): diff --git a/src/fenrir-package/commands/commands/toggle_auto_read.py b/src/fenrir-package/commands/commands/toggle_auto_read.py index 8593d5ce..bc440856 100644 --- a/src/fenrir-package/commands/commands/toggle_auto_read.py +++ b/src/fenrir-package/commands/commands/toggle_auto_read.py @@ -1,5 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): pass 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 e0b58a12..b74235e4 100644 --- a/src/fenrir-package/commands/commands/toggle_auto_spell_check.py +++ b/src/fenrir-package/commands/commands/toggle_auto_spell_check.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/commands/toggle_braille.py b/src/fenrir-package/commands/commands/toggle_braille.py index 88245e76..4583e587 100644 --- a/src/fenrir-package/commands/commands/toggle_braille.py +++ b/src/fenrir-package/commands/commands/toggle_braille.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/commands/toggle_output.py b/src/fenrir-package/commands/commands/toggle_output.py index d28f4fbf..cc810530 100644 --- a/src/fenrir-package/commands/commands/toggle_output.py +++ b/src/fenrir-package/commands/commands/toggle_output.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/commands/toggle_sound.py b/src/fenrir-package/commands/commands/toggle_sound.py index cccb0a65..5c2ac442 100644 --- a/src/fenrir-package/commands/commands/toggle_sound.py +++ b/src/fenrir-package/commands/commands/toggle_sound.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/commands/toggle_speech.py b/src/fenrir-package/commands/commands/toggle_speech.py index 709d3111..a6a61551 100644 --- a/src/fenrir-package/commands/commands/toggle_speech.py +++ b/src/fenrir-package/commands/commands/toggle_speech.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/commands/toggle_tutorial_mode.py b/src/fenrir-package/commands/commands/toggle_tutorial_mode.py index 98ed4ace..3b48b836 100644 --- a/src/fenrir-package/commands/commands/toggle_tutorial_mode.py +++ b/src/fenrir-package/commands/commands/toggle_tutorial_mode.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/onInput/10000-shut_up.py b/src/fenrir-package/commands/onInput/10000-shut_up.py index 410621ec..fa2ab5f5 100644 --- a/src/fenrir-package/commands/onInput/10000-shut_up.py +++ b/src/fenrir-package/commands/onInput/10000-shut_up.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/onInput/54000-present_char_if_cursor_change_horizontal.py b/src/fenrir-package/commands/onInput/54000-present_char_if_cursor_change_horizontal.py index c56b4785..0c971352 100644 --- a/src/fenrir-package/commands/onInput/54000-present_char_if_cursor_change_horizontal.py +++ b/src/fenrir-package/commands/onInput/54000-present_char_if_cursor_change_horizontal.py @@ -1,5 +1,11 @@ #!/bin/python -import time +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug + class command(): def __init__(self): pass diff --git a/src/fenrir-package/commands/onInput/55000-present_line_if_cursor_change_vertical.py b/src/fenrir-package/commands/onInput/55000-present_line_if_cursor_change_vertical.py index 3746c040..83374a4a 100644 --- a/src/fenrir-package/commands/onInput/55000-present_line_if_cursor_change_vertical.py +++ b/src/fenrir-package/commands/onInput/55000-present_line_if_cursor_change_vertical.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/onScreenChanged/50000-char_echo.py b/src/fenrir-package/commands/onScreenChanged/50000-char_echo.py index 7a90f331..a29443a0 100644 --- a/src/fenrir-package/commands/onScreenChanged/50000-char_echo.py +++ b/src/fenrir-package/commands/onScreenChanged/50000-char_echo.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/onScreenChanged/60000-word_echo.py b/src/fenrir-package/commands/onScreenChanged/60000-word_echo.py index df1b358a..5ea03cd2 100644 --- a/src/fenrir-package/commands/onScreenChanged/60000-word_echo.py +++ b/src/fenrir-package/commands/onScreenChanged/60000-word_echo.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug from utils import word_utils class command(): diff --git a/src/fenrir-package/commands/onScreenChanged/62000-spell_check.py b/src/fenrir-package/commands/onScreenChanged/62000-spell_check.py index 5c670f04..5739834d 100644 --- a/src/fenrir-package/commands/onScreenChanged/62000-spell_check.py +++ b/src/fenrir-package/commands/onScreenChanged/62000-spell_check.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug from utils import word_utils initialized = False try: diff --git a/src/fenrir-package/commands/onScreenChanged/65000-char_delete_echo.py b/src/fenrir-package/commands/onScreenChanged/65000-char_delete_echo.py index f159863b..67b664f7 100644 --- a/src/fenrir-package/commands/onScreenChanged/65000-char_delete_echo.py +++ b/src/fenrir-package/commands/onScreenChanged/65000-char_delete_echo.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/onScreenChanged/70000-incomming.py b/src/fenrir-package/commands/onScreenChanged/70000-incomming.py index bf6b19de..d1a47bcb 100644 --- a/src/fenrir-package/commands/onScreenChanged/70000-incomming.py +++ b/src/fenrir-package/commands/onScreenChanged/70000-incomming.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/onScreenChanged/75000-incomming_promote.py b/src/fenrir-package/commands/onScreenChanged/75000-incomming_promote.py index e05ef321..ea703d55 100644 --- a/src/fenrir-package/commands/onScreenChanged/75000-incomming_promote.py +++ b/src/fenrir-package/commands/onScreenChanged/75000-incomming_promote.py @@ -1,5 +1,11 @@ #!/bin/python import time +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/onScreenChanged/80000-screen_change_announcement.py b/src/fenrir-package/commands/onScreenChanged/80000-screen_change_announcement.py index be3e6d9a..0abe9766 100644 --- a/src/fenrir-package/commands/onScreenChanged/80000-screen_change_announcement.py +++ b/src/fenrir-package/commands/onScreenChanged/80000-screen_change_announcement.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/onScreenChanged/85000-screen_chnage_reset_marks.py b/src/fenrir-package/commands/onScreenChanged/85000-screen_chnage_reset_marks.py index ac9893a9..2d07d5a8 100644 --- a/src/fenrir-package/commands/onScreenChanged/85000-screen_chnage_reset_marks.py +++ b/src/fenrir-package/commands/onScreenChanged/85000-screen_chnage_reset_marks.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/commands/onScreenChanged/88000-screen_chnage_leve_review_mode.py b/src/fenrir-package/commands/onScreenChanged/88000-screen_chnage_leve_review_mode.py index 0f1fb27b..48788242 100644 --- a/src/fenrir-package/commands/onScreenChanged/88000-screen_chnage_leve_review_mode.py +++ b/src/fenrir-package/commands/onScreenChanged/88000-screen_chnage_leve_review_mode.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class command(): def __init__(self): diff --git a/src/fenrir-package/core/commandManager.py b/src/fenrir-package/core/commandManager.py index 33c3e03c..5892701c 100644 --- a/src/fenrir-package/core/commandManager.py +++ b/src/fenrir-package/core/commandManager.py @@ -1,7 +1,12 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + import importlib.util import glob, os, time -from utils import debug +from core import debug class commandManager(): def __init__(self): diff --git a/src/fenrir-package/core/commands.py b/src/fenrir-package/core/commands.py index c6f7eec6..5372172b 100644 --- a/src/fenrir-package/core/commands.py +++ b/src/fenrir-package/core/commands.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug import time diff --git a/src/fenrir-package/utils/debug.py b/src/fenrir-package/core/debug.py similarity index 100% rename from src/fenrir-package/utils/debug.py rename to src/fenrir-package/core/debug.py diff --git a/src/fenrir-package/core/environment.py b/src/fenrir-package/core/environment.py index f6e63d94..ba768a91 100644 --- a/src/fenrir-package/core/environment.py +++ b/src/fenrir-package/core/environment.py @@ -1,5 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug from core import settings from core import runtime from core import screenData diff --git a/src/fenrir-package/core/generalInformation.py b/src/fenrir-package/core/generalInformation.py index 658d0680..2a0c6013 100644 --- a/src/fenrir-package/core/generalInformation.py +++ b/src/fenrir-package/core/generalInformation.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug generalInformation = { 'running': True, diff --git a/src/fenrir-package/core/inputEvent.py b/src/fenrir-package/core/inputEvent.py index 0b75c0b0..78bb7fc8 100644 --- a/src/fenrir-package/core/inputEvent.py +++ b/src/fenrir-package/core/inputEvent.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug import time input = { diff --git a/src/fenrir-package/core/inputManager.py b/src/fenrir-package/core/inputManager.py index 5272ec51..60a11496 100644 --- a/src/fenrir-package/core/inputManager.py +++ b/src/fenrir-package/core/inputManager.py @@ -1,7 +1,11 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. import time -from utils import debug +from core import debug from core import inputEvent class inputManager(): diff --git a/src/fenrir-package/core/outputManager.py b/src/fenrir-package/core/outputManager.py index 7b33265c..440f9773 100644 --- a/src/fenrir-package/core/outputManager.py +++ b/src/fenrir-package/core/outputManager.py @@ -1,5 +1,10 @@ #!/bin/python -from utils import debug +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug class outputManager(): def __init__(self): diff --git a/src/fenrir-package/core/runtime.py b/src/fenrir-package/core/runtime.py index 06d87e9c..ad192bf6 100644 --- a/src/fenrir-package/core/runtime.py +++ b/src/fenrir-package/core/runtime.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug runtime = { 'speechDriver': None, diff --git a/src/fenrir-package/core/screenData.py b/src/fenrir-package/core/screenData.py index 16c16804..e22c5ace 100644 --- a/src/fenrir-package/core/screenData.py +++ b/src/fenrir-package/core/screenData.py @@ -1,5 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug import time screenData = { diff --git a/src/fenrir-package/core/screenManager.py b/src/fenrir-package/core/screenManager.py index ea76667f..53fd2256 100644 --- a/src/fenrir-package/core/screenManager.py +++ b/src/fenrir-package/core/screenManager.py @@ -1,6 +1,11 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug import time -from utils import debug class screenManager(): def __init__(self): diff --git a/src/fenrir-package/core/settings.py b/src/fenrir-package/core/settings.py index 95c8e0b0..f9304214 100644 --- a/src/fenrir-package/core/settings.py +++ b/src/fenrir-package/core/settings.py @@ -1,6 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- -from utils import debug +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug settings = { 'sound': { diff --git a/src/fenrir-package/core/settingsManager.py b/src/fenrir-package/core/settingsManager.py index 5611426e..85713fca 100644 --- a/src/fenrir-package/core/settingsManager.py +++ b/src/fenrir-package/core/settingsManager.py @@ -1,4 +1,8 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. import importlib.util import os @@ -9,7 +13,7 @@ from core import commandManager from core import screenManager from core import environment from core.settings import settings -from utils import debug +from core import debug class settingsManager(): def __init__(self): diff --git a/src/fenrir-package/fenrir.py b/src/fenrir-package/fenrir.py index 3788831f..8b4d7e38 100755 --- a/src/fenrir-package/fenrir.py +++ b/src/fenrir-package/fenrir.py @@ -10,7 +10,7 @@ if not os.getcwd() in sys.path: sys.path.append(os.getcwd()) from core import settingsManager -from utils import debug +from core import debug class fenrir(): def __init__(self): diff --git a/src/fenrir-package/inputDriver/evdev.py b/src/fenrir-package/inputDriver/evdev.py index 0f617733..7feec2b0 100644 --- a/src/fenrir-package/inputDriver/evdev.py +++ b/src/fenrir-package/inputDriver/evdev.py @@ -1,12 +1,16 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. import evdev -from evdev import InputDevice, UInput import time +from evdev import InputDevice, UInput from select import select from core import inputEvent -from utils import debug +from core import debug class driver(): def __init__(self): diff --git a/src/fenrir-package/screenDriver/linux.py b/src/fenrir-package/screenDriver/linux.py index 1aa72995..33f4d119 100644 --- a/src/fenrir-package/screenDriver/linux.py +++ b/src/fenrir-package/screenDriver/linux.py @@ -1,9 +1,12 @@ #!/bin/python # -*- coding: utf-8 -*- +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + import difflib import subprocess -from utils import debug +from core import debug class driver(): def __init__(self): @@ -50,10 +53,10 @@ class driver(): newContentBytes = vcsa.read() vcsa.close() if len(newContentBytes) < 5: - return environment + return except Exception as e: environment['runtime']['debug'].writeDebugOut(environment,str(e),debug.debugLevel.ERROR) - return environment + return screenEncoding = environment['runtime']['settingsManager'].getSetting(environment,'screen', 'encoding') # set new "old" values environment['screenData']['oldContentBytes'] = environment['screenData']['newContentBytes'] diff --git a/src/fenrir-package/soundDriver/generic.py b/src/fenrir-package/soundDriver/generic.py index 3728b65e..a410c5de 100644 --- a/src/fenrir-package/soundDriver/generic.py +++ b/src/fenrir-package/soundDriver/generic.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug import subprocess class driver(): diff --git a/src/fenrir-package/soundDriver/gstreamer.py b/src/fenrir-package/soundDriver/gstreamer.py index 228b6de9..de68eed0 100644 --- a/src/fenrir-package/soundDriver/gstreamer.py +++ b/src/fenrir-package/soundDriver/gstreamer.py @@ -1,3 +1,10 @@ +#!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug import gi import time from gi.repository import GLib diff --git a/src/fenrir-package/speechDriver/espeak.py b/src/fenrir-package/speechDriver/espeak.py index 941b1160..52aaea82 100644 --- a/src/fenrir-package/speechDriver/espeak.py +++ b/src/fenrir-package/speechDriver/espeak.py @@ -1,7 +1,12 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. # Espeak driver +from core import debug + class driver(): def __init__(self ): self._es = None diff --git a/src/fenrir-package/speechDriver/generic.py b/src/fenrir-package/speechDriver/generic.py index ff6a7134..718843c8 100644 --- a/src/fenrir-package/speechDriver/generic.py +++ b/src/fenrir-package/speechDriver/generic.py @@ -1,7 +1,12 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. # generic driver +from core import debug + class driver(): def __init__(self ): pass diff --git a/src/fenrir-package/speechDriver/speechd.py b/src/fenrir-package/speechDriver/speechd.py index a8bf526a..e723feee 100644 --- a/src/fenrir-package/speechDriver/speechd.py +++ b/src/fenrir-package/speechDriver/speechd.py @@ -1,7 +1,12 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. # speech-dispatcher driver +from core import debug + class driver(): def __init__(self ): self._sd = None @@ -14,14 +19,14 @@ class driver(): except: self._initialized = False def initialize(self, environment): - return environment + pass def shutdown(self, environment): if not self._isInitialized: - return environment + return self._isInitialized = False self.cancel() self._sd.close() - return environment + return def speak(self,text, queueable=True): if not self._isInitialized: diff --git a/src/fenrir-package/utils/char_utils.py b/src/fenrir-package/utils/char_utils.py index 8f09fd9a..902d781c 100644 --- a/src/fenrir-package/utils/char_utils.py +++ b/src/fenrir-package/utils/char_utils.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug def getPrevChar(currX,currY, currText): if currText == '': diff --git a/src/fenrir-package/utils/line_utils.py b/src/fenrir-package/utils/line_utils.py index 6a60a672..2de24fad 100644 --- a/src/fenrir-package/utils/line_utils.py +++ b/src/fenrir-package/utils/line_utils.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug def getPrevLine(currX,currY, currText): if currText == '': diff --git a/src/fenrir-package/utils/mark_utils.py b/src/fenrir-package/utils/mark_utils.py index 948fd733..17961a30 100644 --- a/src/fenrir-package/utils/mark_utils.py +++ b/src/fenrir-package/utils/mark_utils.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug def getTextBetweenMarks(firstMark, secondMark, inText): if inText == None: diff --git a/src/fenrir-package/utils/review_utils.py b/src/fenrir-package/utils/review_utils.py index 18412368..1bca1526 100644 --- a/src/fenrir-package/utils/review_utils.py +++ b/src/fenrir-package/utils/review_utils.py @@ -1,3 +1,8 @@ #!/bin/python +# -*- coding: utf-8 -*- +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug diff --git a/src/fenrir-package/utils/word_utils.py b/src/fenrir-package/utils/word_utils.py index 9ce88d9e..aa4d30d3 100644 --- a/src/fenrir-package/utils/word_utils.py +++ b/src/fenrir-package/utils/word_utils.py @@ -1,4 +1,10 @@ #!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from core import debug def getPrevWord(currX,currY, currText): if currText == '':