clean up output

This commit is contained in:
chrys 2016-07-07 01:51:54 +02:00
parent 1e93905a23
commit d745d8a9c0

View File

@ -46,7 +46,6 @@ while(runtime['running']):
runtime['newContentBytes'] = vcsa.read()
vcsa.close()
except:
print('Nope' + runtime['screenDriver'] + runtime['newTTY'])
continue
# get metadata like cursor or screensize
@ -70,12 +69,8 @@ while(runtime['running']):
if runtime['oldContentBytes'] != runtime['newContentBytes']:
if len(runtime['delta']) < 3:
runtime['speechDriver'].cancel()
print(len(runtime['delta']))
print("tty3 changed")
print(runtime['delta'])
diff = difflib.ndiff(runtime['oldContentText'], runtime['newContentText'])
runtime['delta'] = ''.join(x[2:] for x in diff if x.startswith('+ '))
print(runtime['delta'])
runtime['speechDriver'].speak(runtime['delta'])
# set new "old" values