add review announce linebreak and endofline
This commit is contained in:
parent
e4b0327aca
commit
6023ca8800
@ -9,6 +9,7 @@ most:===:.,:-$~+*-/\@!#%^&*()[]}{<>;
|
||||
all:===:!"#$%& \'()*+,-./:;<=>?@[\\]^_`{|}~
|
||||
|
||||
[punctDict]
|
||||
:===:spacasdfe
|
||||
&:===:and
|
||||
':===:apostrophe
|
||||
@:===:at
|
||||
|
@ -117,7 +117,7 @@ cursor=True
|
||||
highlight=False
|
||||
|
||||
[review]
|
||||
newLine=True
|
||||
lineBreak=True
|
||||
endOfScreen=True
|
||||
|
||||
[promote]
|
||||
|
@ -119,7 +119,7 @@ cursor=True
|
||||
highlight=False
|
||||
|
||||
[review]
|
||||
newLine=True
|
||||
lineBreak=True
|
||||
endOfScreen=True
|
||||
|
||||
[promote]
|
||||
|
@ -119,7 +119,7 @@ cursor=True
|
||||
highlight=False
|
||||
|
||||
[review]
|
||||
newLine=True
|
||||
lineBreak=True
|
||||
endOfScreen=True
|
||||
|
||||
[promote]
|
||||
|
@ -69,7 +69,7 @@ cursor=True
|
||||
highlight=False
|
||||
|
||||
[review]
|
||||
newLine=True
|
||||
lineBreak=True
|
||||
endOfScreen=True
|
||||
|
||||
[promote]
|
||||
|
@ -23,9 +23,6 @@ class command():
|
||||
self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], currChar = \
|
||||
char_utils.getCurrentChar(self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText'])
|
||||
|
||||
if currChar.isspace():
|
||||
self.env['runtime']['outputManager'].presentText("blank" ,interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(currChar ,interrupt=True, ignorePunctuation=True, announceCapital=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
|
@ -15,16 +15,15 @@ class command():
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'set review cursor to end of current line and display the content'
|
||||
return 'set review cursor to char below the current char and present it.'
|
||||
|
||||
def run(self):
|
||||
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
|
||||
self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], downChar, endOfScreen = \
|
||||
char_utils.getDownChar(self.env['screenData']['newCursorReview']['x'],self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText'])
|
||||
if downChar.isspace():
|
||||
self.env['runtime']['outputManager'].presentText("line is empty" ,interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(downChar ,interrupt=True, ignorePunctuation=True, announceCapital=True)
|
||||
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=False, soundIcon='EndOfScreen')
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -23,9 +23,6 @@ class command():
|
||||
self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], currChar = \
|
||||
char_utils.getCurrentChar(self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText'])
|
||||
|
||||
if currChar.isspace():
|
||||
self.env['runtime']['outputManager'].presentText("space" ,interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(currChar ,interrupt=True, ignorePunctuation=True, announceCapital=True)
|
||||
self.env['runtime']['outputManager'].presentText("end of line", interrupt=False)
|
||||
|
||||
|
@ -23,9 +23,6 @@ class command():
|
||||
self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], lastChar = \
|
||||
char_utils.getLastCharInLine(self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText'])
|
||||
|
||||
if lastChar.isspace():
|
||||
self.env['runtime']['outputManager'].presentText("line is empty" ,interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(lastChar ,interrupt=True, ignorePunctuation=True, announceCapital=True)
|
||||
self.env['runtime']['outputManager'].presentText("last char in line", interrupt=False)
|
||||
|
||||
|
@ -22,10 +22,12 @@ class command():
|
||||
self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], nextChar, endOfScreen, lineBreak = \
|
||||
char_utils.getNextChar(self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText'])
|
||||
|
||||
if nextChar.isspace():
|
||||
self.env['runtime']['outputManager'].presentText("space", interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(nextChar, interrupt=True, ignorePunctuation=True, announceCapital=True)
|
||||
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=False, soundIcon='EndOfScreen')
|
||||
if lineBreak:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
|
||||
self.env['runtime']['outputManager'].presentText('line break' ,interrupt=False, soundIcon='EndOfLine')
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -23,11 +23,13 @@ class command():
|
||||
self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], nextChar, endOfScreen, lineBreak = \
|
||||
char_utils.getNextChar(self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText'])
|
||||
|
||||
if nextChar.isspace():
|
||||
self.env['runtime']['outputManager'].presentText("blank" ,interrupt=True)
|
||||
else:
|
||||
nextChar = char_utils.getPhonetic(nextChar)
|
||||
self.env['runtime']['outputManager'].presentText(nextChar ,interrupt=True, announceCapital=True)
|
||||
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=False, soundIcon='EndOfScreen')
|
||||
if lineBreak:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
|
||||
self.env['runtime']['outputManager'].presentText('line break' ,interrupt=False, soundIcon='EndOfLine')
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -29,6 +29,8 @@ class command():
|
||||
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(nextLine, interrupt=True)
|
||||
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=False, soundIcon='EndOfScreen')
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -29,6 +29,11 @@ class command():
|
||||
self.env['runtime']['outputManager'].presentText("blank", interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(nextWord, interrupt=True)
|
||||
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=False, soundIcon='EndOfScreen')
|
||||
if lineBreak:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
|
||||
self.env['runtime']['outputManager'].presentText('line break' ,interrupt=False, soundIcon='EndOfLine')
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -31,6 +31,11 @@ class command():
|
||||
currChar = char_utils.getPhonetic(c)
|
||||
self.env['runtime']['outputManager'].presentText(currChar, interrupt=firstSequence, announceCapital=True)
|
||||
firstSequence = False
|
||||
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=False, soundIcon='EndOfScreen')
|
||||
if lineBreak:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
|
||||
self.env['runtime']['outputManager'].presentText('line break' ,interrupt=False, soundIcon='EndOfLine')
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -25,10 +25,12 @@ class command():
|
||||
self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], prevChar, endOfScreen, lineBreak = \
|
||||
char_utils.getPrevChar(self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText'])
|
||||
|
||||
if prevChar.isspace():
|
||||
self.env['runtime']['outputManager'].presentText("space", interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(prevChar, interrupt=True, ignorePunctuation=True, announceCapital=True)
|
||||
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=False, soundIcon='EndOfScreen')
|
||||
if lineBreak:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
|
||||
self.env['runtime']['outputManager'].presentText('line break' ,interrupt=False, soundIcon='EndOfLine')
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -23,11 +23,13 @@ class command():
|
||||
self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], prevChar, endOfScreen, lineBreak = \
|
||||
char_utils.getPrevChar(self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText'])
|
||||
|
||||
if prevChar.isspace():
|
||||
self.env['runtime']['outputManager'].presentText("blank" ,interrupt=True)
|
||||
else:
|
||||
prevChar = char_utils.getPhonetic(prevChar)
|
||||
self.env['runtime']['outputManager'].presentText(prevChar ,interrupt=True, announceCapital=True)
|
||||
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=False, soundIcon='EndOfScreen')
|
||||
if lineBreak:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
|
||||
self.env['runtime']['outputManager'].presentText('line break' ,interrupt=False, soundIcon='EndOfLine')
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -27,6 +27,9 @@ class command():
|
||||
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(prevLine, interrupt=True)
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=False, soundIcon='EndOfScreen')
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -27,6 +27,11 @@ class command():
|
||||
self.env['runtime']['outputManager'].presentText("blank", interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(prevWord, interrupt=True)
|
||||
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=False, soundIcon='EndOfScreen')
|
||||
if lineBreak:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
|
||||
self.env['runtime']['outputManager'].presentText('line break' ,interrupt=False, soundIcon='EndOfLine')
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -31,6 +31,11 @@ class command():
|
||||
currChar = char_utils.getPhonetic(c)
|
||||
self.env['runtime']['outputManager'].presentText(currChar, interrupt=firstSequence, announceCapital=True)
|
||||
firstSequence = False
|
||||
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=False, soundIcon='EndOfScreen')
|
||||
if lineBreak:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
|
||||
self.env['runtime']['outputManager'].presentText('line break' ,interrupt=False, soundIcon='EndOfLine')
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -15,16 +15,18 @@ class command():
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'set review cursor to end of current line and display the content'
|
||||
return 'set review cursor to the char in the line below and present it'
|
||||
|
||||
def run(self):
|
||||
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
|
||||
self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], upChar, endOfScreen = \
|
||||
char_utils.getUpChar(self.env['screenData']['newCursorReview']['x'],self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText'])
|
||||
if upChar.isspace():
|
||||
self.env['runtime']['outputManager'].presentText("line is empty" ,interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(upChar ,interrupt=True, ignorePunctuation=True, announceCapital=True)
|
||||
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText('end of screen' ,interrupt=False, soundIcon='EndOfScreen')
|
||||
if lineBreak:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
|
||||
self.env['runtime']['outputManager'].presentText('line break' ,interrupt=False, soundIcon='EndOfLine')
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -28,7 +28,7 @@ class outputManager():
|
||||
if self.playSoundIcon(soundIcon, interrupt):
|
||||
self.env['runtime']['debug'].writeDebugOut("soundIcon found" ,debug.debugLevel.INFO)
|
||||
return
|
||||
if text.strip(string.whitespace) == '':
|
||||
if (len(text) > 1) and (text.strip(string.whitespace) == ''):
|
||||
return
|
||||
toAnnounceCapital = announceCapital and text[0].isupper()
|
||||
if toAnnounceCapital:
|
||||
|
@ -15,6 +15,7 @@ punctuation = {
|
||||
'all': string.punctuation + ' §',
|
||||
},
|
||||
'PUNCTDICT':{
|
||||
' ':'space',
|
||||
'&':'and',
|
||||
"'":"apostrophe",
|
||||
'@':'at',
|
||||
|
@ -60,7 +60,7 @@ settings = {
|
||||
'highlight': False,
|
||||
},
|
||||
'review':{
|
||||
'newLine': True,
|
||||
'lineBreak': True,
|
||||
'endOfScreen': True,
|
||||
},
|
||||
'promote':{
|
||||
|
Loading…
Reference in New Issue
Block a user