finish remove unneeded returns, import debug to everything, add header

This commit is contained in:
chrys 2016-09-19 22:15:58 +02:00
parent b6178fa933
commit 010b9b4e06
94 changed files with 541 additions and 33 deletions

View File

@ -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):

View File

@ -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):

View File

@ -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:

View File

@ -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):

View File

@ -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():

View File

@ -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):

View File

@ -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():

View File

@ -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):

View File

@ -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():

View File

@ -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):

View File

@ -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():

View File

@ -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():

View File

@ -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():

View File

@ -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

View File

@ -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):

View File

@ -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():

View File

@ -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():

View File

@ -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():

View File

@ -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():

View File

@ -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():

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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():

View File

@ -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():

View File

@ -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():

View File

@ -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():

View File

@ -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():

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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():

View File

@ -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():

View File

@ -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):

View File

@ -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():

View File

@ -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():

View File

@ -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():

View File

@ -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):

View File

@ -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():

View File

@ -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():

View File

@ -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):

View File

@ -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):

View File

@ -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()

View File

@ -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):

View File

@ -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():

View File

@ -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):

View File

@ -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):

View File

@ -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:

View File

@ -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():

View File

@ -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

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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

View File

@ -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):

View File

@ -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):

View File

@ -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():

View File

@ -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:

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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

View File

@ -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

View File

@ -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,

View File

@ -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 = {

View File

@ -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():

View File

@ -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):

View File

@ -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,

View File

@ -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 = {

View File

@ -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):

View File

@ -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': {

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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']

View File

@ -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():

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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 == '':

View File

@ -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 == '':

View File

@ -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:

View File

@ -1,3 +1,8 @@
#!/bin/python
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from core import debug

View File

@ -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 == '':