add pause after line
This commit is contained in:
parent
f42eafd816
commit
d4402d13cf
@ -100,6 +100,7 @@ debugLevel=0
|
|||||||
punctuationProfile=default
|
punctuationProfile=default
|
||||||
punctuationLevel=some
|
punctuationLevel=some
|
||||||
respectPunctuationPause=True
|
respectPunctuationPause=True
|
||||||
|
newLinePause=True
|
||||||
numberOfClipboards=10
|
numberOfClipboards=10
|
||||||
emoticons=True
|
emoticons=True
|
||||||
# define the current fenrir key
|
# define the current fenrir key
|
||||||
|
@ -51,6 +51,7 @@ debugLevel=0
|
|||||||
punctuationProfile=default
|
punctuationProfile=default
|
||||||
punctuationLevel=some
|
punctuationLevel=some
|
||||||
respectPunctuationPause=True
|
respectPunctuationPause=True
|
||||||
|
newLinePause=True
|
||||||
numberOfClipboards=10
|
numberOfClipboards=10
|
||||||
emoticons=True
|
emoticons=True
|
||||||
fenrirKeys=KEY_KP0
|
fenrirKeys=KEY_KP0
|
||||||
|
@ -88,6 +88,8 @@ class outputManager():
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
text = self.env['runtime']['punctuationManager'].proceedPunctuation(text,ignorePunctuation)
|
text = self.env['runtime']['punctuationManager'].proceedPunctuation(text,ignorePunctuation)
|
||||||
|
text = text.replace('\n',' , ')
|
||||||
|
|
||||||
self.env['runtime']['speechDriver'].speak(text)
|
self.env['runtime']['speechDriver'].speak(text)
|
||||||
self.env['runtime']['debug'].writeDebugOut("Speak: "+ text,debug.debugLevel.INFO)
|
self.env['runtime']['debug'].writeDebugOut("Speak: "+ text,debug.debugLevel.INFO)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
@ -44,6 +44,7 @@ settings = {
|
|||||||
'punctuationProfile':'default',
|
'punctuationProfile':'default',
|
||||||
'punctuationLevel': 'some',
|
'punctuationLevel': 'some',
|
||||||
'respectPunctuationPause':True,
|
'respectPunctuationPause':True,
|
||||||
|
'newLinePause':True,
|
||||||
'numberOfClipboards': 10,
|
'numberOfClipboards': 10,
|
||||||
'emoticons': True,
|
'emoticons': True,
|
||||||
'fenrirKeys': ['KEY_KP0','KEY_META'],
|
'fenrirKeys': ['KEY_KP0','KEY_META'],
|
||||||
|
@ -116,6 +116,7 @@ class driver():
|
|||||||
# changes on the screen
|
# changes on the screen
|
||||||
oldScreenText = re.sub(' +',' ',self.env['runtime']['screenManager'].getWindowAreaInText(self.env['screenData']['oldContentText']))
|
oldScreenText = re.sub(' +',' ',self.env['runtime']['screenManager'].getWindowAreaInText(self.env['screenData']['oldContentText']))
|
||||||
newScreenText = re.sub(' +',' ',self.env['runtime']['screenManager'].getWindowAreaInText(self.env['screenData']['newContentText']))
|
newScreenText = re.sub(' +',' ',self.env['runtime']['screenManager'].getWindowAreaInText(self.env['screenData']['newContentText']))
|
||||||
|
typing = False
|
||||||
if (self.env['screenData']['oldContentText'] != self.env['screenData']['newContentText']) and \
|
if (self.env['screenData']['oldContentText'] != self.env['screenData']['newContentText']) and \
|
||||||
(self.env['screenData']['newContentText'] != '' ):
|
(self.env['screenData']['newContentText'] != '' ):
|
||||||
if oldScreenText == '' and\
|
if oldScreenText == '' and\
|
||||||
@ -133,11 +134,16 @@ class driver():
|
|||||||
newScreenText = self.env['screenData']['newContentText'][cursorLineStart:cursorLineEnd]
|
newScreenText = self.env['screenData']['newContentText'][cursorLineStart:cursorLineEnd]
|
||||||
newScreenText = re.sub(' +',' ',newScreenText)
|
newScreenText = re.sub(' +',' ',newScreenText)
|
||||||
diff = difflib.ndiff(oldScreenText, newScreenText)
|
diff = difflib.ndiff(oldScreenText, newScreenText)
|
||||||
|
typing = True
|
||||||
else:
|
else:
|
||||||
diff = difflib.ndiff( oldScreenText.split('\n'),\
|
diff = difflib.ndiff( oldScreenText.split('\n'),\
|
||||||
newScreenText.split('\n'))
|
newScreenText.split('\n'))
|
||||||
|
|
||||||
diffList = list(diff)
|
diffList = list(diff)
|
||||||
|
|
||||||
|
if self.env['runtime']['settingsManager'].getSetting('general', 'newLinePause') and not typing:
|
||||||
|
self.env['screenData']['newDelta'] = '\n'.join(x[2:] for x in diffList if x[0] == '+')
|
||||||
|
else:
|
||||||
self.env['screenData']['newDelta'] = ''.join(x[2:] for x in diffList if x[0] == '+')
|
self.env['screenData']['newDelta'] = ''.join(x[2:] for x in diffList if x[0] == '+')
|
||||||
self.env['screenData']['newNegativeDelta'] = ''.join(x[2:] for x in diffList if x[0] == '-')
|
self.env['screenData']['newNegativeDelta'] = ''.join(x[2:] for x in diffList if x[0] == '-')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user