2016-07-07 13:43:31 -04:00
|
|
|
#!/bin/python
|
|
|
|
|
|
|
|
# Fenrir TTY screen reader
|
|
|
|
# By Chrys, Storm Dragon, and contributers.
|
|
|
|
|
|
|
|
import os, sys
|
|
|
|
|
2016-07-07 15:40:10 -04:00
|
|
|
DEBUG = False
|
|
|
|
|
2016-07-07 13:43:31 -04:00
|
|
|
if not os.getcwd() in sys.path:
|
|
|
|
sys.path.append(os.getcwd())
|
|
|
|
|
|
|
|
|
|
|
|
from core import environment
|
2016-07-07 15:40:10 -04:00
|
|
|
from core import inputManager
|
2016-07-07 13:43:31 -04:00
|
|
|
from utils import debug
|
2016-07-07 15:40:10 -04:00
|
|
|
|
2016-07-07 13:43:31 -04:00
|
|
|
from speech import espeak as es
|
|
|
|
from speech import speechd as sd
|
|
|
|
from screen import linux as lx
|
|
|
|
|
|
|
|
class fenrir():
|
|
|
|
def __init__(self):
|
|
|
|
self.runtime = environment.runtime
|
2016-07-07 15:40:10 -04:00
|
|
|
self.runtime['inputManager'] = inputManager.inputManager()
|
|
|
|
if DEBUG:
|
|
|
|
self.runtime['debug'] = debug.debug()
|
2016-07-07 13:56:46 -04:00
|
|
|
self.settings = environment.settings
|
|
|
|
self.bindings = {}
|
|
|
|
self.autospeak = []
|
|
|
|
self.soundIcons = {}
|
2016-07-07 15:40:10 -04:00
|
|
|
|
|
|
|
# the following hard coded, in future we have a config loader
|
2016-07-07 13:43:31 -04:00
|
|
|
self.runtime['speechDriverString'] = 'speechd'
|
|
|
|
self.runtime['speechDriver'] = sd.speech()
|
|
|
|
self.runtime['screenDriverString'] = 'linux'
|
|
|
|
self.runtime['screenDriver'] = lx.screenManager()
|
|
|
|
|
|
|
|
def proceed(self):
|
|
|
|
while(self.runtime['running']):
|
|
|
|
self.runtime = self.runtime['screenDriver'].analyzeScreen(self.runtime)
|
2016-07-07 15:53:37 -04:00
|
|
|
# self.runtime = self.runtime['inputManager'].getKeyPressed(self.runtime)
|
|
|
|
self.shutdown()
|
|
|
|
|
2016-07-07 13:56:46 -04:00
|
|
|
def shutdown(self):
|
|
|
|
pass
|
2016-07-07 13:43:31 -04:00
|
|
|
|
|
|
|
app = fenrir()
|
|
|
|
app.proceed()
|