File restructuring.
This commit is contained in:
parent
78ca59a938
commit
55ce73322b
@ -1,21 +1,21 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No description found'
|
||||
def run(self):
|
||||
pass
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No description found'
|
||||
def run(self):
|
||||
pass
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,26 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
# this command is just to initialize stuff.
|
||||
# like init index lists in memoryManager
|
||||
# it is not useful to execute it
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
# clipboard
|
||||
self.env['runtime']['memoryManager'].addIndexList('clipboardHistory', self.env['runtime']['settingsManager'].getSettingAsInt('general', 'numberOfClipboards'))
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No description found'
|
||||
def run(self):
|
||||
pass
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
# this command is just to initialize stuff.
|
||||
# like init index lists in memoryManager
|
||||
# it is not useful to execute it
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
# clipboard
|
||||
self.env['runtime']['memoryManager'].addIndexList('clipboardHistory', self.env['runtime']['settingsManager'].getSettingAsInt('general', 'numberOfClipboards'))
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No description found'
|
||||
def run(self):
|
||||
pass
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,30 +1,30 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import screen_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Reads attributes of current cursor position')
|
||||
def run(self):
|
||||
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
|
||||
try:
|
||||
attributes = self.env['runtime']['attributeManager'].getAttributeByXY( cursorPos['x'], cursorPos['y'])
|
||||
except Exception as e:
|
||||
print(e)
|
||||
attributeFormatString = self.env['runtime']['settingsManager'].getSetting('general', 'attributeFormatString')
|
||||
attributeFormatString = self.env['runtime']['attributeManager'].formatAttributes(attributes, attributeFormatString)
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(attributeFormatString, soundIcon='', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import screen_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Reads attributes of current cursor position')
|
||||
def run(self):
|
||||
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
|
||||
try:
|
||||
attributes = self.env['runtime']['attributeManager'].getAttributeByXY( cursorPos['x'], cursorPos['y'])
|
||||
except Exception as e:
|
||||
print(e)
|
||||
attributeFormatString = self.env['runtime']['settingsManager'].getSetting('general', 'attributeFormatString')
|
||||
attributeFormatString = self.env['runtime']['attributeManager'].formatAttributes(attributes, attributeFormatString)
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(attributeFormatString, soundIcon='', interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,24 +1,24 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('clears the currently selected clipboard')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['memoryManager'].clearCurrentIndexList('clipboardHistory')
|
||||
self.env['runtime']['outputManager'].presentText(_('clipboard cleared'), interrupt=True)
|
||||
return
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('clears the currently selected clipboard')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['memoryManager'].clearCurrentIndexList('clipboardHistory')
|
||||
self.env['runtime']['outputManager'].presentText(_('clipboard cleared'), interrupt=True)
|
||||
return
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,27 +1,27 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('speaks the contents of the currently selected clipboard')
|
||||
|
||||
def run(self):
|
||||
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
|
||||
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
|
||||
return
|
||||
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
|
||||
self.env['runtime']['outputManager'].presentText(clipboard , interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('speaks the contents of the currently selected clipboard')
|
||||
|
||||
def run(self):
|
||||
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
|
||||
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
|
||||
return
|
||||
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
|
||||
self.env['runtime']['outputManager'].presentText(clipboard , interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,26 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('reads the contents of the current screen')
|
||||
|
||||
def run(self):
|
||||
if self.env['screen']['newContentText'].isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("screen is empty"), soundIcon='EmptyLine', interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(self.env['screen']['newContentText'],interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('reads the contents of the current screen')
|
||||
|
||||
def run(self):
|
||||
if self.env['screen']['newContentText'].isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("screen is empty"), soundIcon='EmptyLine', interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(self.env['screen']['newContentText'],interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,25 +1,25 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Column number for cursor')
|
||||
def run(self):
|
||||
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
|
||||
self.env['runtime']['outputManager'].presentText(str(cursorPos['x'] + 1) , interrupt=True)
|
||||
self.env['runtime']['outputManager'].announceActiveCursor()
|
||||
self.env['runtime']['outputManager'].presentText(' column number' , interrupt=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Column number for cursor')
|
||||
def run(self):
|
||||
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
|
||||
self.env['runtime']['outputManager'].presentText(str(cursorPos['x'] + 1) , interrupt=True)
|
||||
self.env['runtime']['outputManager'].announceActiveCursor()
|
||||
self.env['runtime']['outputManager'].presentText(' column number' , interrupt=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,25 +1,25 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Line number for cursor')
|
||||
def run(self):
|
||||
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
|
||||
self.env['runtime']['outputManager'].presentText(str(cursorPos['y'] + 1), interrupt=True)
|
||||
self.env['runtime']['outputManager'].announceActiveCursor()
|
||||
self.env['runtime']['outputManager'].presentText(' line number' , interrupt=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Line number for cursor')
|
||||
def run(self):
|
||||
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
|
||||
self.env['runtime']['outputManager'].presentText(str(cursorPos['y'] + 1), interrupt=True)
|
||||
self.env['runtime']['outputManager'].announceActiveCursor()
|
||||
self.env['runtime']['outputManager'].presentText(' line number' , interrupt=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,30 +1,30 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import datetime
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('presents the date')
|
||||
|
||||
def run(self):
|
||||
dateFormat = self.env['runtime']['settingsManager'].getSetting('general', 'dateFormat')
|
||||
|
||||
# get the time formatted
|
||||
dateString = datetime.datetime.strftime(datetime.datetime.now(), dateFormat)
|
||||
|
||||
# present the time via speak and braile, there is no soundicon, interrupt the current speech
|
||||
self.env['runtime']['outputManager'].presentText(dateString , soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import datetime
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('presents the date')
|
||||
|
||||
def run(self):
|
||||
dateFormat = self.env['runtime']['settingsManager'].getSetting('general', 'dateFormat')
|
||||
|
||||
# get the time formatted
|
||||
dateString = datetime.datetime.strftime(datetime.datetime.now(), dateFormat)
|
||||
|
||||
# present the time via speak and braile, there is no soundicon, interrupt the current speech
|
||||
self.env['runtime']['outputManager'].presentText(dateString , soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,33 +1,33 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import math
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('decrease sound volume')
|
||||
|
||||
def run(self):
|
||||
|
||||
value = self.env['runtime']['settingsManager'].getSettingAsFloat('sound', 'volume')
|
||||
|
||||
value = round((math.ceil(10 * value) / 10) - 0.1, 2)
|
||||
if value < 0.1:
|
||||
value = 0.1
|
||||
self.env['runtime']['settingsManager'].setSetting('sound', 'volume', str(value))
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(_("{0} percent sound volume").format(int(value * 100)), soundIcon='SoundOff', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import math
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('decrease sound volume')
|
||||
|
||||
def run(self):
|
||||
|
||||
value = self.env['runtime']['settingsManager'].getSettingAsFloat('sound', 'volume')
|
||||
|
||||
value = round((math.ceil(10 * value) / 10) - 0.1, 2)
|
||||
if value < 0.1:
|
||||
value = 0.1
|
||||
self.env['runtime']['settingsManager'].setSetting('sound', 'volume', str(value))
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(_("{0} percent sound volume").format(int(value * 100)), soundIcon='SoundOff', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,29 +1,29 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import math
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Decreases the pitch of the speech')
|
||||
|
||||
def run(self):
|
||||
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'pitch')
|
||||
value = round((math.ceil(10 * value) / 10) - 0.1, 2)
|
||||
if value < 0.0:
|
||||
value = 0.0
|
||||
self.env['runtime']['settingsManager'].setSetting('speech', 'pitch', str(value))
|
||||
self.env['runtime']['outputManager'].presentText(_('{0} percent speech pitch').format(int(value * 100)), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import math
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Decreases the pitch of the speech')
|
||||
|
||||
def run(self):
|
||||
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'pitch')
|
||||
value = round((math.ceil(10 * value) / 10) - 0.1, 2)
|
||||
if value < 0.0:
|
||||
value = 0.0
|
||||
self.env['runtime']['settingsManager'].setSetting('speech', 'pitch', str(value))
|
||||
self.env['runtime']['outputManager'].presentText(_('{0} percent speech pitch').format(int(value * 100)), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,30 +1,30 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import math
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Decreases the rate of the speech')
|
||||
|
||||
def run(self):
|
||||
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'rate')
|
||||
value = round((math.ceil(10 * value) / 10) - 0.1, 2)
|
||||
if value < 0.0:
|
||||
value = 0.0
|
||||
self.env['runtime']['settingsManager'].setSetting('speech', 'rate', str(value))
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(_("{0} percent speech rate").format(int(value * 100)), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import math
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Decreases the rate of the speech')
|
||||
|
||||
def run(self):
|
||||
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'rate')
|
||||
value = round((math.ceil(10 * value) / 10) - 0.1, 2)
|
||||
if value < 0.0:
|
||||
value = 0.0
|
||||
self.env['runtime']['settingsManager'].setSetting('speech', 'rate', str(value))
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(_("{0} percent speech rate").format(int(value * 100)), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,31 +1,31 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import math
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Decreases the volume of the speech')
|
||||
|
||||
def run(self):
|
||||
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'volume')
|
||||
value = round((math.ceil(10 * value) / 10) - 0.1, 2)
|
||||
if value < 0.1:
|
||||
value = 0.1
|
||||
self.env['runtime']['settingsManager'].setSetting('speech', 'volume', str(value))
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(_("{0} percent speech volume").format(int(value * 100)), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import math
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Decreases the volume of the speech')
|
||||
|
||||
def run(self):
|
||||
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'volume')
|
||||
value = round((math.ceil(10 * value) / 10) - 0.1, 2)
|
||||
if value < 0.1:
|
||||
value = 0.1
|
||||
self.env['runtime']['settingsManager'].setSetting('speech', 'volume', str(value))
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(_("{0} percent speech volume").format(int(value * 100)), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,28 +1,28 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('exits review mode')
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['cursorManager'].isReviewMode():
|
||||
self.env['runtime']['outputManager'].presentText(_("Not in Review Mode"), interrupt=True)
|
||||
return
|
||||
|
||||
self.env['runtime']['cursorManager'].clearReviewCursor()
|
||||
self.env['runtime']['outputManager'].presentText(_("Exiting Review Mode"), interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('exits review mode')
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['cursorManager'].isReviewMode():
|
||||
self.env['runtime']['outputManager'].presentText(_("Not in Review Mode"), interrupt=True)
|
||||
return
|
||||
|
||||
self.env['runtime']['cursorManager'].clearReviewCursor()
|
||||
self.env['runtime']['outputManager'].presentText(_("Exiting Review Mode"), interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,39 +1,39 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import os
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment, scriptPath=''):
|
||||
self.env = environment
|
||||
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('export the current fenrir clipboard to a file')
|
||||
def run(self):
|
||||
clipboardFilePath = self.env['runtime']['settingsManager'].getSetting('general', 'clipboardExportPath')
|
||||
clipboardFilePath = clipboardFilePath.replace('$user',self.env['general']['currUser'])
|
||||
clipboardFilePath = clipboardFilePath.replace('$USER',self.env['general']['currUser'])
|
||||
clipboardFilePath = clipboardFilePath.replace('$User',self.env['general']['currUser'])
|
||||
clipboardFile = open(clipboardFilePath,'w')
|
||||
try:
|
||||
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
|
||||
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
|
||||
return
|
||||
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
|
||||
clipboardFile.write(clipboard)
|
||||
clipboardFile.close()
|
||||
os.chmod(clipboardFilePath, 0o666)
|
||||
self.env['runtime']['outputManager'].presentText(_('clipboard exported to file'), interrupt=True)
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('export_clipboard_to_file:run: Filepath:'+ clipboardFile +' trace:' + str(e),debug.debugLevel.ERROR)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import os
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment, scriptPath=''):
|
||||
self.env = environment
|
||||
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('export the current fenrir clipboard to a file')
|
||||
def run(self):
|
||||
clipboardFilePath = self.env['runtime']['settingsManager'].getSetting('general', 'clipboardExportPath')
|
||||
clipboardFilePath = clipboardFilePath.replace('$user',self.env['general']['currUser'])
|
||||
clipboardFilePath = clipboardFilePath.replace('$USER',self.env['general']['currUser'])
|
||||
clipboardFilePath = clipboardFilePath.replace('$User',self.env['general']['currUser'])
|
||||
clipboardFile = open(clipboardFilePath,'w')
|
||||
try:
|
||||
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
|
||||
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
|
||||
return
|
||||
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
|
||||
clipboardFile.write(clipboard)
|
||||
clipboardFile.close()
|
||||
os.chmod(clipboardFilePath, 0o666)
|
||||
self.env['runtime']['outputManager'].presentText(_('clipboard exported to file'), interrupt=True)
|
||||
except Exception as e:
|
||||
self.env['runtime']['debug'].writeDebugOut('export_clipboard_to_file:run: Filepath:'+ clipboardFile +' trace:' + str(e),debug.debugLevel.ERROR)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,77 +1,77 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import subprocess, os
|
||||
from subprocess import Popen, PIPE
|
||||
import _thread
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Export current fenrir clipboard to X or GUI clipboard')
|
||||
def run(self):
|
||||
_thread.start_new_thread(self._threadRun , ())
|
||||
def _threadRun(self):
|
||||
try:
|
||||
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
|
||||
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
|
||||
return
|
||||
|
||||
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
|
||||
user = self.env['general']['currUser']
|
||||
|
||||
# First try to find xclip in common locations
|
||||
xclip_paths = [
|
||||
'/usr/bin/xclip',
|
||||
'/bin/xclip',
|
||||
'/usr/local/bin/xclip'
|
||||
]
|
||||
|
||||
xclip_path = None
|
||||
for path in xclip_paths:
|
||||
if os.path.isfile(path) and os.access(path, os.X_OK):
|
||||
xclip_path = path
|
||||
break
|
||||
|
||||
if not xclip_path:
|
||||
self.env['runtime']['outputManager'].presentText(
|
||||
'xclip not found in common locations',
|
||||
interrupt=True
|
||||
)
|
||||
return
|
||||
|
||||
for display in range(10):
|
||||
p = Popen(
|
||||
['su', user, '-p', '-c', f"{xclip_path} -d :{display} -selection clipboard"],
|
||||
stdin=PIPE, stdout=PIPE, stderr=PIPE, preexec_fn=os.setpgrp
|
||||
)
|
||||
stdout, stderr = p.communicate(input=clipboard.encode('utf-8'))
|
||||
|
||||
self.env['runtime']['outputManager'].interruptOutput()
|
||||
|
||||
stderr = stderr.decode('utf-8')
|
||||
stdout = stdout.decode('utf-8')
|
||||
|
||||
if stderr == '':
|
||||
break
|
||||
|
||||
if stderr != '':
|
||||
self.env['runtime']['outputManager'].presentText(stderr, soundIcon='', interrupt=False)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText('exported to the X session.', interrupt=True)
|
||||
|
||||
except Exception as e:
|
||||
self.env['runtime']['outputManager'].presentText(str(e), soundIcon='', interrupt=False)
|
||||
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import subprocess, os
|
||||
from subprocess import Popen, PIPE
|
||||
import _thread
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Export current fenrir clipboard to X or GUI clipboard')
|
||||
def run(self):
|
||||
_thread.start_new_thread(self._threadRun , ())
|
||||
def _threadRun(self):
|
||||
try:
|
||||
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
|
||||
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
|
||||
return
|
||||
|
||||
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
|
||||
user = self.env['general']['currUser']
|
||||
|
||||
# First try to find xclip in common locations
|
||||
xclip_paths = [
|
||||
'/usr/bin/xclip',
|
||||
'/bin/xclip',
|
||||
'/usr/local/bin/xclip'
|
||||
]
|
||||
|
||||
xclip_path = None
|
||||
for path in xclip_paths:
|
||||
if os.path.isfile(path) and os.access(path, os.X_OK):
|
||||
xclip_path = path
|
||||
break
|
||||
|
||||
if not xclip_path:
|
||||
self.env['runtime']['outputManager'].presentText(
|
||||
'xclip not found in common locations',
|
||||
interrupt=True
|
||||
)
|
||||
return
|
||||
|
||||
for display in range(10):
|
||||
p = Popen(
|
||||
['su', user, '-p', '-c', f"{xclip_path} -d :{display} -selection clipboard"],
|
||||
stdin=PIPE, stdout=PIPE, stderr=PIPE, preexec_fn=os.setpgrp
|
||||
)
|
||||
stdout, stderr = p.communicate(input=clipboard.encode('utf-8'))
|
||||
|
||||
self.env['runtime']['outputManager'].interruptOutput()
|
||||
|
||||
stderr = stderr.decode('utf-8')
|
||||
stdout = stdout.decode('utf-8')
|
||||
|
||||
if stderr == '':
|
||||
break
|
||||
|
||||
if stderr != '':
|
||||
self.env['runtime']['outputManager'].presentText(stderr, soundIcon='', interrupt=False)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText('exported to the X session.', interrupt=True)
|
||||
|
||||
except Exception as e:
|
||||
self.env['runtime']['outputManager'].presentText(str(e), soundIcon='', interrupt=False)
|
||||
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,28 +1,28 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('selects the first clipboard')
|
||||
|
||||
def run(self):
|
||||
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
|
||||
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
|
||||
return
|
||||
self.env['runtime']['memoryManager'].setFirstIndex('clipboardHistory')
|
||||
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
|
||||
self.env['runtime']['outputManager'].presentText(clipboard, interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('selects the first clipboard')
|
||||
|
||||
def run(self):
|
||||
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
|
||||
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
|
||||
return
|
||||
self.env['runtime']['memoryManager'].setFirstIndex('clipboardHistory')
|
||||
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
|
||||
self.env['runtime']['outputManager'].presentText(clipboard, interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,24 +1,24 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('sends the following keypress to the terminal or application')
|
||||
|
||||
def run(self):
|
||||
self.env['input']['keyForeward'] = 3
|
||||
self.env['runtime']['outputManager'].presentText(_('Forward next keypress'), interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('sends the following keypress to the terminal or application')
|
||||
|
||||
def run(self):
|
||||
self.env['input']['keyForeward'] = 3
|
||||
self.env['runtime']['outputManager'].presentText(_('Forward next keypress'), interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,54 +1,54 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import subprocess, os
|
||||
from subprocess import Popen, PIPE
|
||||
import _thread
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment, scriptPath=''):
|
||||
self.env = environment
|
||||
self.scriptPath = scriptPath
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _("imports the graphical clipboard to Fenrir's clipboard")
|
||||
def run(self):
|
||||
_thread.start_new_thread(self._threadRun , ())
|
||||
def _threadRun(self):
|
||||
try:
|
||||
# Find xclip path
|
||||
xclip_paths = ['/usr/bin/xclip', '/bin/xclip', '/usr/local/bin/xclip']
|
||||
xclip_path = None
|
||||
for path in xclip_paths:
|
||||
if os.path.isfile(path) and os.access(path, os.X_OK):
|
||||
xclip_path = path
|
||||
break
|
||||
if not xclip_path:
|
||||
self.env['runtime']['outputManager'].presentText('xclip not found in common locations', interrupt=True)
|
||||
return
|
||||
xClipboard = ''
|
||||
for display in range(10):
|
||||
p = Popen('su ' + self.env['general']['currUser'] + ' -p -c "' + xclip_path + ' -d :' + str(display) + ' -o"', stdout=PIPE, stderr=PIPE, shell=True)
|
||||
stdout, stderr = p.communicate()
|
||||
self.env['runtime']['outputManager'].interruptOutput()
|
||||
stderr = stderr.decode('utf-8')
|
||||
xClipboard = stdout.decode('utf-8')
|
||||
if (stderr == ''):
|
||||
break
|
||||
if stderr != '':
|
||||
self.env['runtime']['outputManager'].presentText(stderr , soundIcon='', interrupt=False)
|
||||
else:
|
||||
self.env['runtime']['memoryManager'].addValueToFirstIndex('clipboardHistory', xClipboard)
|
||||
self.env['runtime']['outputManager'].presentText('Import to Clipboard', soundIcon='CopyToClipboard', interrupt=True)
|
||||
self.env['runtime']['outputManager'].presentText(xClipboard, soundIcon='', interrupt=False)
|
||||
except Exception as e:
|
||||
self.env['runtime']['outputManager'].presentText(e , soundIcon='', interrupt=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import subprocess, os
|
||||
from subprocess import Popen, PIPE
|
||||
import _thread
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment, scriptPath=''):
|
||||
self.env = environment
|
||||
self.scriptPath = scriptPath
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _("imports the graphical clipboard to Fenrir's clipboard")
|
||||
def run(self):
|
||||
_thread.start_new_thread(self._threadRun , ())
|
||||
def _threadRun(self):
|
||||
try:
|
||||
# Find xclip path
|
||||
xclip_paths = ['/usr/bin/xclip', '/bin/xclip', '/usr/local/bin/xclip']
|
||||
xclip_path = None
|
||||
for path in xclip_paths:
|
||||
if os.path.isfile(path) and os.access(path, os.X_OK):
|
||||
xclip_path = path
|
||||
break
|
||||
if not xclip_path:
|
||||
self.env['runtime']['outputManager'].presentText('xclip not found in common locations', interrupt=True)
|
||||
return
|
||||
xClipboard = ''
|
||||
for display in range(10):
|
||||
p = Popen('su ' + self.env['general']['currUser'] + ' -p -c "' + xclip_path + ' -d :' + str(display) + ' -o"', stdout=PIPE, stderr=PIPE, shell=True)
|
||||
stdout, stderr = p.communicate()
|
||||
self.env['runtime']['outputManager'].interruptOutput()
|
||||
stderr = stderr.decode('utf-8')
|
||||
xClipboard = stdout.decode('utf-8')
|
||||
if (stderr == ''):
|
||||
break
|
||||
if stderr != '':
|
||||
self.env['runtime']['outputManager'].presentText(stderr , soundIcon='', interrupt=False)
|
||||
else:
|
||||
self.env['runtime']['memoryManager'].addValueToFirstIndex('clipboardHistory', xClipboard)
|
||||
self.env['runtime']['outputManager'].presentText('Import to Clipboard', soundIcon='CopyToClipboard', interrupt=True)
|
||||
self.env['runtime']['outputManager'].presentText(xClipboard, soundIcon='', interrupt=False)
|
||||
except Exception as e:
|
||||
self.env['runtime']['outputManager'].presentText(e , soundIcon='', interrupt=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,32 +1,32 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import math
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('adjusts the volume for in coming sounds')
|
||||
|
||||
def run(self):
|
||||
|
||||
value = self.env['runtime']['settingsManager'].getSettingAsFloat('sound', 'volume')
|
||||
|
||||
value = round((math.ceil(10 * value) / 10) + 0.1, 2)
|
||||
if value > 1.0:
|
||||
value = 1.0
|
||||
self.env['runtime']['settingsManager'].setSetting('sound', 'volume', str(value))
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(_("{0} percent sound volume").format(int(value * 100)), soundIcon='SoundOn', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import math
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('adjusts the volume for in coming sounds')
|
||||
|
||||
def run(self):
|
||||
|
||||
value = self.env['runtime']['settingsManager'].getSettingAsFloat('sound', 'volume')
|
||||
|
||||
value = round((math.ceil(10 * value) / 10) + 0.1, 2)
|
||||
if value > 1.0:
|
||||
value = 1.0
|
||||
self.env['runtime']['settingsManager'].setSetting('sound', 'volume', str(value))
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(_("{0} percent sound volume").format(int(value * 100)), soundIcon='SoundOn', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,30 +1,30 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import math
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Increases the pitch of the speech')
|
||||
|
||||
def run(self):
|
||||
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'pitch')
|
||||
value = round((math.ceil(10 * value) / 10) + 0.1, 2)
|
||||
if value > 1.0:
|
||||
value = 1.0
|
||||
self.env['runtime']['settingsManager'].setSetting('speech', 'pitch', str(value))
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(_("{0} percent speech pitch").format(int(value * 100)), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import math
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Increases the pitch of the speech')
|
||||
|
||||
def run(self):
|
||||
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'pitch')
|
||||
value = round((math.ceil(10 * value) / 10) + 0.1, 2)
|
||||
if value > 1.0:
|
||||
value = 1.0
|
||||
self.env['runtime']['settingsManager'].setSetting('speech', 'pitch', str(value))
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(_("{0} percent speech pitch").format(int(value * 100)), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,30 +1,30 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import math
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Increase the speech rate')
|
||||
|
||||
def run(self):
|
||||
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'rate')
|
||||
value = round((math.ceil(10 * value) / 10) + 0.1, 2)
|
||||
if value > 1.0:
|
||||
value = 1.0
|
||||
self.env['runtime']['settingsManager'].setSetting('speech', 'rate', str(value))
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(_("{0} percent speech rate").format(int(value * 100)), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import math
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Increase the speech rate')
|
||||
|
||||
def run(self):
|
||||
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'rate')
|
||||
value = round((math.ceil(10 * value) / 10) + 0.1, 2)
|
||||
if value > 1.0:
|
||||
value = 1.0
|
||||
self.env['runtime']['settingsManager'].setSetting('speech', 'rate', str(value))
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(_("{0} percent speech rate").format(int(value * 100)), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,30 +1,30 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import math
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Increase the speech volume')
|
||||
|
||||
def run(self):
|
||||
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'volume')
|
||||
value = round((math.ceil(10 * value) / 10) + 0.1, 2)
|
||||
if value > 1.0:
|
||||
value = 1.0
|
||||
self.env['runtime']['settingsManager'].setSetting('speech', 'volume', str(value))
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(_("{0} percent speech volume").format(int(value * 100)), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import math
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Increase the speech volume')
|
||||
|
||||
def run(self):
|
||||
value = self.env['runtime']['settingsManager'].getSettingAsFloat('speech', 'volume')
|
||||
value = round((math.ceil(10 * value) / 10) + 0.1, 2)
|
||||
if value > 1.0:
|
||||
value = 1.0
|
||||
self.env['runtime']['settingsManager'].setSetting('speech', 'volume', str(value))
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(_("{0} percent speech volume").format(int(value * 100)), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,28 +1,28 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('selects the last clipboard')
|
||||
|
||||
def run(self):
|
||||
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
|
||||
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
|
||||
return
|
||||
self.env['runtime']['memoryManager'].setLastIndex('clipboardHistory')
|
||||
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
|
||||
self.env['runtime']['outputManager'].presentText(clipboard, interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('selects the last clipboard')
|
||||
|
||||
def run(self):
|
||||
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
|
||||
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
|
||||
return
|
||||
self.env['runtime']['memoryManager'].setLastIndex('clipboardHistory')
|
||||
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
|
||||
self.env['runtime']['outputManager'].presentText(clipboard, interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,23 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Presents the text which was last received')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['outputManager'].presentText(self.env['screen']['newDelta'], interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Presents the text which was last received')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['outputManager'].presentText(self.env['screen']['newDelta'], interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,36 +1,36 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('selects the next clipboard')
|
||||
|
||||
def run(self):
|
||||
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
|
||||
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
|
||||
return
|
||||
self.env['runtime']['memoryManager'].getNextIndex('clipboardHistory')
|
||||
isFirst = self.env['runtime']['memoryManager'].isFirstIndex('clipboardHistory')
|
||||
isLast = self.env['runtime']['memoryManager'].isLastIndex('clipboardHistory')
|
||||
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
|
||||
if isFirst:
|
||||
self.env['runtime']['outputManager'].presentText(_('First clipboard '), interrupt=True)
|
||||
if isLast:
|
||||
self.env['runtime']['outputManager'].presentText(_('Last clipboard '), interrupt=True)
|
||||
|
||||
speechInterrupt = not(isLast or isFirst)
|
||||
self.env['runtime']['outputManager'].presentText(clipboard, interrupt = speechInterrupt)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('selects the next clipboard')
|
||||
|
||||
def run(self):
|
||||
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
|
||||
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
|
||||
return
|
||||
self.env['runtime']['memoryManager'].getNextIndex('clipboardHistory')
|
||||
isFirst = self.env['runtime']['memoryManager'].isFirstIndex('clipboardHistory')
|
||||
isLast = self.env['runtime']['memoryManager'].isLastIndex('clipboardHistory')
|
||||
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
|
||||
if isFirst:
|
||||
self.env['runtime']['outputManager'].presentText(_('First clipboard '), interrupt=True)
|
||||
if isLast:
|
||||
self.env['runtime']['outputManager'].presentText(_('Last clipboard '), interrupt=True)
|
||||
|
||||
speechInterrupt = not(isLast or isFirst)
|
||||
self.env['runtime']['outputManager'].presentText(clipboard, interrupt = speechInterrupt)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,30 +1,30 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import time
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
self.env['runtime']['memoryManager'].addIndexList('clipboardHistory', self.env['runtime']['settingsManager'].getSettingAsInt('general', 'numberOfClipboards'))
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('pastes the text from the currently selected clipboard')
|
||||
|
||||
def run(self):
|
||||
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
|
||||
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
|
||||
return
|
||||
self.env['runtime']['outputManager'].presentText('paste clipboard', soundIcon='PasteClipboardOnScreen', interrupt=True)
|
||||
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
|
||||
self.env['runtime']['screenManager'].injectTextToScreen(clipboard)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import time
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
self.env['runtime']['memoryManager'].addIndexList('clipboardHistory', self.env['runtime']['settingsManager'].getSettingAsInt('general', 'numberOfClipboards'))
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('pastes the text from the currently selected clipboard')
|
||||
|
||||
def run(self):
|
||||
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
|
||||
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
|
||||
return
|
||||
self.env['runtime']['outputManager'].presentText('paste clipboard', soundIcon='PasteClipboardOnScreen', interrupt=True)
|
||||
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
|
||||
self.env['runtime']['screenManager'].injectTextToScreen(clipboard)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,35 +1,35 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('selects the previous clipboard')
|
||||
|
||||
def run(self):
|
||||
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
|
||||
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
|
||||
return
|
||||
self.env['runtime']['memoryManager'].setPrefIndex('clipboardHistory')
|
||||
isFirst = self.env['runtime']['memoryManager'].isFirstIndex('clipboardHistory')
|
||||
isLast = self.env['runtime']['memoryManager'].isLastIndex('clipboardHistory')
|
||||
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
|
||||
if isFirst:
|
||||
self.env['runtime']['outputManager'].presentText(_('First clipboard '), interrupt=True)
|
||||
if isLast:
|
||||
self.env['runtime']['outputManager'].presentText(_('Last clipboard '), interrupt=True)
|
||||
speechInterrupt = not(isLast or isFirst)
|
||||
self.env['runtime']['outputManager'].presentText(clipboard, interrupt = speechInterrupt)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('selects the previous clipboard')
|
||||
|
||||
def run(self):
|
||||
if self.env['runtime']['memoryManager'].isIndexListEmpty('clipboardHistory'):
|
||||
self.env['runtime']['outputManager'].presentText(_('clipboard empty'), interrupt=True)
|
||||
return
|
||||
self.env['runtime']['memoryManager'].setPrefIndex('clipboardHistory')
|
||||
isFirst = self.env['runtime']['memoryManager'].isFirstIndex('clipboardHistory')
|
||||
isLast = self.env['runtime']['memoryManager'].isLastIndex('clipboardHistory')
|
||||
clipboard = self.env['runtime']['memoryManager'].getIndexListElement('clipboardHistory')
|
||||
if isFirst:
|
||||
self.env['runtime']['outputManager'].presentText(_('First clipboard '), interrupt=True)
|
||||
if isLast:
|
||||
self.env['runtime']['outputManager'].presentText(_('Last clipboard '), interrupt=True)
|
||||
speechInterrupt = not(isLast or isFirst)
|
||||
self.env['runtime']['outputManager'].presentText(clipboard, interrupt = speechInterrupt)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,24 +1,24 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('exits Fenrir')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['eventManager'].stopMainEventLoop()
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('exits Fenrir')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['eventManager'].stopMainEventLoop()
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,32 +1,32 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import line_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('current line')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
|
||||
|
||||
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], currLine = \
|
||||
line_utils.getCurrentLine(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
|
||||
|
||||
if currLine.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(currLine, interrupt=True, flush=False)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import line_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('current line')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
|
||||
|
||||
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], currLine = \
|
||||
line_utils.getCurrentLine(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
|
||||
|
||||
if currLine.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(currLine, interrupt=True, flush=False)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,37 +1,37 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('current word.')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
|
||||
|
||||
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], currWord, endOfScreen, lineBreak = \
|
||||
word_utils.getCurrentWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
|
||||
|
||||
if currWord.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, 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
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('current word.')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
|
||||
|
||||
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], currWord, endOfScreen, lineBreak = \
|
||||
word_utils.getCurrentWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
|
||||
|
||||
if currWord.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, 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
|
||||
|
@ -1,41 +1,41 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
from fenrirscreenreader.utils import char_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Phonetically spells the current word')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
|
||||
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], currWord, endOfScreen, lineBreak = \
|
||||
word_utils.getCurrentWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
|
||||
|
||||
if currWord.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
|
||||
else:
|
||||
firstSequence = True
|
||||
for c in currWord:
|
||||
currChar = char_utils.getPhonetic(c)
|
||||
self.env['runtime']['outputManager'].presentText(currChar, interrupt=firstSequence, announceCapital=True, flush=False)
|
||||
firstSequence = False
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, 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
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
from fenrirscreenreader.utils import char_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Phonetically spells the current word')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
|
||||
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], currWord, endOfScreen, lineBreak = \
|
||||
word_utils.getCurrentWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
|
||||
|
||||
if currWord.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
|
||||
else:
|
||||
firstSequence = True
|
||||
for c in currWord:
|
||||
currChar = char_utils.getPhonetic(c)
|
||||
self.env['runtime']['outputManager'].presentText(currChar, interrupt=firstSequence, announceCapital=True, flush=False)
|
||||
firstSequence = False
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, 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
|
||||
|
@ -1,36 +1,36 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import line_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('moves review to the next line ')
|
||||
|
||||
def run(self):
|
||||
self.env['screen']['oldCursorReview'] = self.env['screen']['newCursorReview']
|
||||
if not self.env['screen']['newCursorReview']:
|
||||
self.env['screen']['newCursorReview'] = self.env['screen']['newCursor'].copy()
|
||||
|
||||
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], nextLine, endOfScreen = \
|
||||
line_utils.getNextLine(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
|
||||
|
||||
if nextLine.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(nextLine, interrupt=True, flush=False)
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import line_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('moves review to the next line ')
|
||||
|
||||
def run(self):
|
||||
self.env['screen']['oldCursorReview'] = self.env['screen']['newCursorReview']
|
||||
if not self.env['screen']['newCursorReview']:
|
||||
self.env['screen']['newCursorReview'] = self.env['screen']['newCursor'].copy()
|
||||
|
||||
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], nextLine, endOfScreen = \
|
||||
line_utils.getNextLine(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
|
||||
|
||||
if nextLine.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(nextLine, interrupt=True, flush=False)
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,39 +1,39 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('moves review to the next word ')
|
||||
|
||||
def run(self):
|
||||
self.env['screen']['oldCursorReview'] = self.env['screen']['newCursorReview']
|
||||
if self.env['screen']['newCursorReview'] == None:
|
||||
self.env['screen']['newCursorReview'] = self.env['screen']['newCursor'].copy()
|
||||
|
||||
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], nextWord, endOfScreen, lineBreak = \
|
||||
word_utils.getNextWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
|
||||
|
||||
if nextWord.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(nextWord, interrupt=True, flush=False)
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, 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
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('moves review to the next word ')
|
||||
|
||||
def run(self):
|
||||
self.env['screen']['oldCursorReview'] = self.env['screen']['newCursorReview']
|
||||
if self.env['screen']['newCursorReview'] == None:
|
||||
self.env['screen']['newCursorReview'] = self.env['screen']['newCursor'].copy()
|
||||
|
||||
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], nextWord, endOfScreen, lineBreak = \
|
||||
word_utils.getNextWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
|
||||
|
||||
if nextWord.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(nextWord, interrupt=True, flush=False)
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, 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
|
||||
|
@ -1,41 +1,41 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
from fenrirscreenreader.utils import char_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Phonetically spells the next word and moves review to it')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
|
||||
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], nextWord, endOfScreen, lineBreak = \
|
||||
word_utils.getNextWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
|
||||
|
||||
if nextWord.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
|
||||
else:
|
||||
firstSequence = True
|
||||
for c in nextWord:
|
||||
currChar = char_utils.getPhonetic(c)
|
||||
self.env['runtime']['outputManager'].presentText(currChar, interrupt=firstSequence, announceCapital=True, flush=False)
|
||||
firstSequence = False
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, 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
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
from fenrirscreenreader.utils import char_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Phonetically spells the next word and moves review to it')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
|
||||
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], nextWord, endOfScreen, lineBreak = \
|
||||
word_utils.getNextWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
|
||||
|
||||
if nextWord.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
|
||||
else:
|
||||
firstSequence = True
|
||||
for c in nextWord:
|
||||
currChar = char_utils.getPhonetic(c)
|
||||
self.env['runtime']['outputManager'].presentText(currChar, interrupt=firstSequence, announceCapital=True, flush=False)
|
||||
firstSequence = False
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, 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
|
||||
|
@ -1,35 +1,35 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import line_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('moves review to the previous line ')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
|
||||
|
||||
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], prevLine, endOfScreen = \
|
||||
line_utils.getPrevLine(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
|
||||
|
||||
if prevLine.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(prevLine, interrupt=True, flush=False)
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import line_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('moves review to the previous line ')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
|
||||
|
||||
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], prevLine, endOfScreen = \
|
||||
line_utils.getPrevLine(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
|
||||
|
||||
if prevLine.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(prevLine, interrupt=True, flush=False)
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,37 +1,37 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('moves review focus to the previous word ')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
|
||||
|
||||
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], prevWord, endOfScreen, lineBreak = \
|
||||
word_utils.getPrevWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
|
||||
|
||||
if prevWord.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(prevWord, interrupt=True, flush=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
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('moves review focus to the previous word ')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
|
||||
|
||||
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], prevWord, endOfScreen, lineBreak = \
|
||||
word_utils.getPrevWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
|
||||
|
||||
if prevWord.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(prevWord, interrupt=True, flush=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
|
||||
|
@ -1,41 +1,41 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
from fenrirscreenreader.utils import char_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Phonetically spells the previous word and moves review to it')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
|
||||
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], prevWord, endOfScreen, lineBreak = \
|
||||
word_utils.getPrevWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
|
||||
|
||||
if prevWord.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
|
||||
else:
|
||||
firstSequence = True
|
||||
for c in prevWord:
|
||||
currChar = char_utils.getPhonetic(c)
|
||||
self.env['runtime']['outputManager'].presentText(currChar, interrupt=firstSequence, announceCapital=True, flush=False)
|
||||
firstSequence = False
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, 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
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
from fenrirscreenreader.utils import char_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Phonetically spells the previous word and moves review to it')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()
|
||||
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], prevWord, endOfScreen, lineBreak = \
|
||||
word_utils.getPrevWord(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
|
||||
|
||||
if prevWord.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
|
||||
else:
|
||||
firstSequence = True
|
||||
for c in prevWord:
|
||||
currChar = char_utils.getPhonetic(c)
|
||||
self.env['runtime']['outputManager'].presentText(currChar, interrupt=firstSequence, announceCapital=True, flush=False)
|
||||
firstSequence = False
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, 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
|
||||
|
@ -1,24 +1,24 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.core import settingsManager
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Saves your current Fenrir settings so they are the default.')
|
||||
def run(self):
|
||||
settingsFile = self.env['runtime']['settingsManager'].getSettingsFile()
|
||||
self.env['runtime']['settingsManager'].saveSettings(settingsFile)
|
||||
self.env['runtime']['outputManager'].presentText(_("Settings saved."), interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.core import settingsManager
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Saves your current Fenrir settings so they are the default.')
|
||||
def run(self):
|
||||
settingsFile = self.env['runtime']['settingsManager'].getSettingsFile()
|
||||
self.env['runtime']['settingsManager'].saveSettings(settingsFile)
|
||||
self.env['runtime']['outputManager'].presentText(_("Settings saved."), interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,23 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Interrupts the current presentation')
|
||||
def run(self):
|
||||
if len(self.env['input']['prevDeepestInput']) > len(self.env['input']['currInput']):
|
||||
return
|
||||
self.env['runtime']['outputManager'].interruptOutput()
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Interrupts the current presentation')
|
||||
def run(self):
|
||||
if len(self.env['input']['prevDeepestInput']) > len(self.env['input']['currInput']):
|
||||
return
|
||||
self.env['runtime']['outputManager'].interruptOutput()
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,50 +1,50 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import subprocess, os
|
||||
from subprocess import Popen, PIPE
|
||||
import _thread
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment, scriptPath=''):
|
||||
self.env = environment
|
||||
self.scriptPath = scriptPath
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('script: {0} fullpath: {1}').format(os.path.basename(self.scriptPath), self.scriptPath)
|
||||
def run(self):
|
||||
if not os.path.exists(self.scriptPath):
|
||||
self.env['runtime']['outputManager'].presentText(_('Script file not found'), soundIcon='', interrupt=False)
|
||||
return
|
||||
if not os.path.isfile(self.scriptPath):
|
||||
self.env['runtime']['outputManager'].presentText(_('Script source is not a valid file'), soundIcon='', interrupt=False)
|
||||
return
|
||||
if not os.access(self.scriptPath, os.X_OK):
|
||||
self.env['runtime']['outputManager'].presentText(_('Script file is not executable'), soundIcon='', interrupt=False)
|
||||
return
|
||||
_thread.start_new_thread(self._threadRun , ())
|
||||
|
||||
def _threadRun(self):
|
||||
try:
|
||||
callstring = self.scriptPath + ' ' + self.env['general']['currUser']
|
||||
p = Popen(callstring , stdout=PIPE, stderr=PIPE, shell=True)
|
||||
stdout, stderr = p.communicate()
|
||||
stdout = stdout.decode('utf-8')
|
||||
stderr = stderr.decode('utf-8')
|
||||
self.env['runtime']['outputManager'].interruptOutput()
|
||||
if stderr != '':
|
||||
self.env['runtime']['outputManager'].presentText(str(stderr) , soundIcon='', interrupt=False)
|
||||
if stdout != '':
|
||||
self.env['runtime']['outputManager'].presentText(str(stdout) , soundIcon='', interrupt=False)
|
||||
except Exception as e:
|
||||
self.env['runtime']['outputManager'].presentText(e , soundIcon='', interrupt=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import subprocess, os
|
||||
from subprocess import Popen, PIPE
|
||||
import _thread
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment, scriptPath=''):
|
||||
self.env = environment
|
||||
self.scriptPath = scriptPath
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('script: {0} fullpath: {1}').format(os.path.basename(self.scriptPath), self.scriptPath)
|
||||
def run(self):
|
||||
if not os.path.exists(self.scriptPath):
|
||||
self.env['runtime']['outputManager'].presentText(_('Script file not found'), soundIcon='', interrupt=False)
|
||||
return
|
||||
if not os.path.isfile(self.scriptPath):
|
||||
self.env['runtime']['outputManager'].presentText(_('Script source is not a valid file'), soundIcon='', interrupt=False)
|
||||
return
|
||||
if not os.access(self.scriptPath, os.X_OK):
|
||||
self.env['runtime']['outputManager'].presentText(_('Script file is not executable'), soundIcon='', interrupt=False)
|
||||
return
|
||||
_thread.start_new_thread(self._threadRun , ())
|
||||
|
||||
def _threadRun(self):
|
||||
try:
|
||||
callstring = self.scriptPath + ' ' + self.env['general']['currUser']
|
||||
p = Popen(callstring , stdout=PIPE, stderr=PIPE, shell=True)
|
||||
stdout, stderr = p.communicate()
|
||||
stdout = stdout.decode('utf-8')
|
||||
stderr = stderr.decode('utf-8')
|
||||
self.env['runtime']['outputManager'].interruptOutput()
|
||||
if stderr != '':
|
||||
self.env['runtime']['outputManager'].presentText(str(stderr) , soundIcon='', interrupt=False)
|
||||
if stdout != '':
|
||||
self.env['runtime']['outputManager'].presentText(str(stdout) , soundIcon='', interrupt=False)
|
||||
except Exception as e:
|
||||
self.env['runtime']['outputManager'].presentText(e , soundIcon='', interrupt=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,23 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('disables speech until next keypress')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['outputManager'].tempDisableSpeech()
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('disables speech until next keypress')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['outputManager'].tempDisableSpeech()
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,30 +1,30 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import datetime
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('presents the time')
|
||||
|
||||
def run(self):
|
||||
timeFormat = self.env['runtime']['settingsManager'].getSetting('general', 'timeFormat')
|
||||
|
||||
# get the time formatted
|
||||
timeString = datetime.datetime.strftime(datetime.datetime.now(), timeFormat)
|
||||
|
||||
# present the time via speak and braile, there is no soundicon, interrupt the current speech
|
||||
self.env['runtime']['outputManager'].presentText(timeString , soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import datetime
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('presents the time')
|
||||
|
||||
def run(self):
|
||||
timeFormat = self.env['runtime']['settingsManager'].getSetting('general', 'timeFormat')
|
||||
|
||||
# get the time formatted
|
||||
timeString = datetime.datetime.strftime(datetime.datetime.now(), timeFormat)
|
||||
|
||||
# present the time via speak and braile, there is no soundicon, interrupt the current speech
|
||||
self.env['runtime']['outputManager'].presentText(timeString , soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,26 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('enables or disables automatic reading of indentation level changes')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['settingsManager'].setSetting('general', 'autoPresentIndent', str(not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent')))
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'):
|
||||
self.env['runtime']['outputManager'].presentText(_("autoindent enabled"), soundIcon='', interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_("autoindent disabled"), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('enables or disables automatic reading of indentation level changes')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['settingsManager'].setSetting('general', 'autoPresentIndent', str(not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent')))
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'):
|
||||
self.env['runtime']['outputManager'].presentText(_("autoindent enabled"), soundIcon='', interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_("autoindent disabled"), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,26 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('enables or disables automatic reading of new text as it appears')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['settingsManager'].setSetting('speech', 'autoReadIncoming', str(not self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'autoReadIncoming')))
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'autoReadIncoming'):
|
||||
self.env['runtime']['outputManager'].presentText(_("autoread enabled"), soundIcon='', interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_("autoread disabled"), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('enables or disables automatic reading of new text as it appears')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['settingsManager'].setSetting('speech', 'autoReadIncoming', str(not self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'autoReadIncoming')))
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'autoReadIncoming'):
|
||||
self.env['runtime']['outputManager'].presentText(_("autoread enabled"), soundIcon='', interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_("autoread disabled"), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,27 +1,27 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('enables or disables automatic spell checking')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['settingsManager'].setSetting('general', 'autoSpellCheck', str(not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoSpellCheck')))
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoSpellCheck'):
|
||||
self.env['runtime']['outputManager'].presentText(_("auto spellcheck enabled"), soundIcon='', interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_("auto spellcheck disabled"), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('enables or disables automatic spell checking')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['settingsManager'].setSetting('general', 'autoSpellCheck', str(not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoSpellCheck')))
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoSpellCheck'):
|
||||
self.env['runtime']['outputManager'].presentText(_("auto spellcheck enabled"), soundIcon='', interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_("auto spellcheck disabled"), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,26 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Enables or disables automatic reading of time after specified intervals')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['settingsManager'].setSetting('time', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('time', 'enabled')))
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('time', 'enabled'):
|
||||
self.env['runtime']['outputManager'].presentText(_("Automatic time announcement enabled"), soundIcon='', interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_("Automatic time announcement disabled"), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Enables or disables automatic reading of time after specified intervals')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['settingsManager'].setSetting('time', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('time', 'enabled')))
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('time', 'enabled'):
|
||||
self.env['runtime']['outputManager'].presentText(_("Automatic time announcement enabled"), soundIcon='', interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_("Automatic time announcement disabled"), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,26 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('enables or disables the barrier mode')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['settingsManager'].setSetting('barrier', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('barrier', 'enabled')))
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('barrier', 'enabled'):
|
||||
self.env['runtime']['outputManager'].presentText(_("barrier mode enabled"), soundIcon='', interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_("barrier mode disabled"), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('enables or disables the barrier mode')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['settingsManager'].setSetting('barrier', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('barrier', 'enabled')))
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('barrier', 'enabled'):
|
||||
self.env['runtime']['outputManager'].presentText(_("barrier mode enabled"), soundIcon='', interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_("barrier mode disabled"), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,26 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('enables or disables announcement of emoticons instead of chars')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['settingsManager'].setSetting('general', 'emoticons', str(not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'emoticons')))
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'emoticons'):
|
||||
self.env['runtime']['outputManager'].presentText(_('emoticons enabled'), soundIcon='', interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('emoticons disabled'), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('enables or disables announcement of emoticons instead of chars')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['settingsManager'].setSetting('general', 'emoticons', str(not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'emoticons')))
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'emoticons'):
|
||||
self.env['runtime']['outputManager'].presentText(_('emoticons enabled'), soundIcon='', interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('emoticons disabled'), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,26 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('enables or disables the announcement of attributes')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['settingsManager'].setSetting('general', 'hasAttributes', str(not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes')))
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'):
|
||||
self.env['runtime']['outputManager'].presentText(_("announcement of attributes enabled"), soundIcon='', interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_("announcement of attributes disabled"), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('enables or disables the announcement of attributes')
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['settingsManager'].setSetting('general', 'hasAttributes', str(not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes')))
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'):
|
||||
self.env['runtime']['outputManager'].presentText(_("announcement of attributes enabled"), soundIcon='', interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_("announcement of attributes disabled"), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,29 +1,29 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('enables or disables tracking of highlighted text')
|
||||
|
||||
def run(self):
|
||||
currMode = self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'highlight')
|
||||
|
||||
self.env['runtime']['settingsManager'].setSetting('focus', 'highlight', str(not currMode))
|
||||
self.env['runtime']['settingsManager'].setSetting('focus', 'cursor', str(currMode))
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'highlight'):
|
||||
self.env['runtime']['outputManager'].presentText(_('highlight tracking'), soundIcon='', interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('cursor tracking'), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('enables or disables tracking of highlighted text')
|
||||
|
||||
def run(self):
|
||||
currMode = self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'highlight')
|
||||
|
||||
self.env['runtime']['settingsManager'].setSetting('focus', 'highlight', str(not currMode))
|
||||
self.env['runtime']['settingsManager'].setSetting('focus', 'cursor', str(currMode))
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'highlight'):
|
||||
self.env['runtime']['outputManager'].presentText(_('highlight tracking'), soundIcon='', interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_('cursor tracking'), soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,27 +1,27 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('enables or disables sound')
|
||||
|
||||
def run(self):
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('sound', 'enabled'):
|
||||
self.env['runtime']['outputManager'].presentText(_('sound disabled'), soundIcon='SoundOff', interrupt=True)
|
||||
self.env['runtime']['settingsManager'].setSetting('sound', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('sound', 'enabled')))
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('sound', 'enabled'):
|
||||
self.env['runtime']['outputManager'].presentText(_('sound enabled'), soundIcon='SoundOn', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('enables or disables sound')
|
||||
|
||||
def run(self):
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('sound', 'enabled'):
|
||||
self.env['runtime']['outputManager'].presentText(_('sound disabled'), soundIcon='SoundOff', interrupt=True)
|
||||
self.env['runtime']['settingsManager'].setSetting('sound', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('sound', 'enabled')))
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('sound', 'enabled'):
|
||||
self.env['runtime']['outputManager'].presentText(_('sound enabled'), soundIcon='SoundOn', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,28 +1,28 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('enables or disables speech')
|
||||
|
||||
def run(self):
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled'):
|
||||
self.env['runtime']['outputManager'].interruptOutput()
|
||||
self.env['runtime']['outputManager'].presentText(_('speech disabled'), soundIcon='SpeechOff', interrupt=True)
|
||||
self.env['runtime']['settingsManager'].setSetting('speech', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled')))
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled'):
|
||||
self.env['runtime']['outputManager'].presentText(_('speech enabled'), soundIcon='SpeechOn', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('enables or disables speech')
|
||||
|
||||
def run(self):
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled'):
|
||||
self.env['runtime']['outputManager'].interruptOutput()
|
||||
self.env['runtime']['outputManager'].presentText(_('speech disabled'), soundIcon='SpeechOff', interrupt=True)
|
||||
self.env['runtime']['settingsManager'].setSetting('speech', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled')))
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled'):
|
||||
self.env['runtime']['outputManager'].presentText(_('speech enabled'), soundIcon='SpeechOn', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,33 +1,33 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return ''
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'interruptOnKeyPress'):
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isScreenChange():
|
||||
return
|
||||
# if the filter is set
|
||||
#if self.env['runtime']['settingsManager'].getSetting('keyboard', 'interruptOnKeyPressFilter').strip() != '':
|
||||
# filterList = self.env['runtime']['settingsManager'].getSetting('keyboard', 'interruptOnKeyPressFilter').split(',')
|
||||
# for currInput in self.env['input']['currInput']:
|
||||
# if not currInput in filterList:
|
||||
# return
|
||||
self.env['runtime']['outputManager'].interruptOutput()
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return ''
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'interruptOnKeyPress'):
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isScreenChange():
|
||||
return
|
||||
# if the filter is set
|
||||
#if self.env['runtime']['settingsManager'].getSetting('keyboard', 'interruptOnKeyPressFilter').strip() != '':
|
||||
# filterList = self.env['runtime']['settingsManager'].getSetting('keyboard', 'interruptOnKeyPressFilter').split(',')
|
||||
# for currInput in self.env['input']['currInput']:
|
||||
# if not currInput in filterList:
|
||||
# return
|
||||
self.env['runtime']['outputManager'].interruptOutput()
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,27 +1,27 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('disables speech until next keypress')
|
||||
|
||||
def run(self):
|
||||
if not self.env['commandBuffer']['enableSpeechOnKeypress']:
|
||||
return
|
||||
self.env['runtime']['settingsManager'].setSetting('speech', 'enabled', str(self.env['commandBuffer']['enableSpeechOnKeypress']))
|
||||
self.env['commandBuffer']['enableSpeechOnKeypress'] = False
|
||||
self.env['runtime']['outputManager'].presentText(_("speech enabled"), soundIcon='SpeechOn', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('disables speech until next keypress')
|
||||
|
||||
def run(self):
|
||||
if not self.env['commandBuffer']['enableSpeechOnKeypress']:
|
||||
return
|
||||
self.env['runtime']['settingsManager'].setSetting('speech', 'enabled', str(self.env['commandBuffer']['enableSpeechOnKeypress']))
|
||||
self.env['commandBuffer']['enableSpeechOnKeypress'] = False
|
||||
self.env['runtime']['outputManager'].presentText(_("speech enabled"), soundIcon='SpeechOn', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,55 +1,55 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
# enabled?
|
||||
active = self.env['runtime']['settingsManager'].getSettingAsInt('keyboard', 'charEchoMode')
|
||||
# 0 = off
|
||||
if active == 0:
|
||||
return
|
||||
# 2 = caps only
|
||||
if active == 2:
|
||||
if not self.env['input']['newCapsLock']:
|
||||
return
|
||||
# big changes are no char (but the value is bigger than one maybe the differ needs longer than you can type, so a little strange random buffer for now)
|
||||
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
|
||||
if xMove > 3:
|
||||
return
|
||||
if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']:
|
||||
if self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_TAB']]:
|
||||
return
|
||||
elif self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']:
|
||||
if self.env['runtime']['byteManager'].getLastByteKey() in [b' ', b'\t']:
|
||||
return
|
||||
# detect deletion or chilling
|
||||
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']:
|
||||
return
|
||||
# is there any change?
|
||||
if not self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
# filter unneded space on word begin
|
||||
currDelta = self.env['screen']['newDelta']
|
||||
if len(currDelta.strip()) != len(currDelta) and \
|
||||
currDelta.strip() != '':
|
||||
currDelta = currDelta.strip()
|
||||
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
|
||||
print(currDelta)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
# enabled?
|
||||
active = self.env['runtime']['settingsManager'].getSettingAsInt('keyboard', 'charEchoMode')
|
||||
# 0 = off
|
||||
if active == 0:
|
||||
return
|
||||
# 2 = caps only
|
||||
if active == 2:
|
||||
if not self.env['input']['newCapsLock']:
|
||||
return
|
||||
# big changes are no char (but the value is bigger than one maybe the differ needs longer than you can type, so a little strange random buffer for now)
|
||||
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
|
||||
if xMove > 3:
|
||||
return
|
||||
if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']:
|
||||
if self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_TAB']]:
|
||||
return
|
||||
elif self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']:
|
||||
if self.env['runtime']['byteManager'].getLastByteKey() in [b' ', b'\t']:
|
||||
return
|
||||
# detect deletion or chilling
|
||||
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']:
|
||||
return
|
||||
# is there any change?
|
||||
if not self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
# filter unneded space on word begin
|
||||
currDelta = self.env['screen']['newDelta']
|
||||
if len(currDelta.strip()) != len(currDelta) and \
|
||||
currDelta.strip() != '':
|
||||
currDelta = currDelta.strip()
|
||||
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
|
||||
print(currDelta)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,58 +1,58 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
import string
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
# is it enabled?
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
|
||||
return
|
||||
# is naviation?
|
||||
if self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'] != 1:
|
||||
return
|
||||
# just when cursor move worddetection is needed
|
||||
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
|
||||
return
|
||||
# for now no new line
|
||||
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
# currently writing
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
|
||||
# get the word
|
||||
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||
x, y, currWord, endOfScreen, lineBreak = \
|
||||
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
|
||||
|
||||
# is there a word?
|
||||
if currWord == '':
|
||||
return
|
||||
# at the end of a word
|
||||
if not newContent[self.env['screen']['newCursor']['x']].isspace():
|
||||
return
|
||||
# at the end of a word
|
||||
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
|
||||
(x + len(currWord) != self.env['screen']['newCursor']['x']-1):
|
||||
return
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
import string
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
# is it enabled?
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
|
||||
return
|
||||
# is naviation?
|
||||
if self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'] != 1:
|
||||
return
|
||||
# just when cursor move worddetection is needed
|
||||
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
|
||||
return
|
||||
# for now no new line
|
||||
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
# currently writing
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
|
||||
# get the word
|
||||
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||
x, y, currWord, endOfScreen, lineBreak = \
|
||||
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
|
||||
|
||||
# is there a word?
|
||||
if currWord == '':
|
||||
return
|
||||
# at the end of a word
|
||||
if not newContent[self.env['screen']['newCursor']['x']].isspace():
|
||||
return
|
||||
# at the end of a word
|
||||
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
|
||||
(x + len(currWord) != self.env['screen']['newCursor']['x']-1):
|
||||
return
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,46 +1,46 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charDeleteEcho'):
|
||||
return
|
||||
# detect typing or chilling
|
||||
if self.env['screen']['newCursor']['x'] >= self.env['screen']['oldCursor']['x']:
|
||||
return
|
||||
|
||||
# More than just a deletion happend
|
||||
if self.env['runtime']['screenManager'].isDelta(ignoreSpace=True):
|
||||
return
|
||||
|
||||
# no deletion
|
||||
if not self.env['runtime']['screenManager'].isNegativeDelta():
|
||||
return
|
||||
|
||||
# too much for a single backspace...
|
||||
# word begin produce a diff wiht len == 2 |a | others with 1 |a|
|
||||
if len(self.env['screen']['newNegativeDelta']) > 2:
|
||||
return
|
||||
|
||||
currNegativeDelta = self.env['screen']['newNegativeDelta']
|
||||
if len(currNegativeDelta.strip()) != len(currNegativeDelta) and \
|
||||
currNegativeDelta.strip() != '':
|
||||
currNegativeDelta = currNegativeDelta.strip()
|
||||
self.env['runtime']['outputManager'].presentText(currNegativeDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charDeleteEcho'):
|
||||
return
|
||||
# detect typing or chilling
|
||||
if self.env['screen']['newCursor']['x'] >= self.env['screen']['oldCursor']['x']:
|
||||
return
|
||||
|
||||
# More than just a deletion happend
|
||||
if self.env['runtime']['screenManager'].isDelta(ignoreSpace=True):
|
||||
return
|
||||
|
||||
# no deletion
|
||||
if not self.env['runtime']['screenManager'].isNegativeDelta():
|
||||
return
|
||||
|
||||
# too much for a single backspace...
|
||||
# word begin produce a diff wiht len == 2 |a | others with 1 |a|
|
||||
if len(self.env['screen']['newNegativeDelta']) > 2:
|
||||
return
|
||||
|
||||
currNegativeDelta = self.env['screen']['newNegativeDelta']
|
||||
if len(currNegativeDelta.strip()) != len(currNegativeDelta) and \
|
||||
currNegativeDelta.strip() != '':
|
||||
currNegativeDelta = currNegativeDelta.strip()
|
||||
self.env['runtime']['outputManager'].presentText(currNegativeDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,51 +1,51 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import char_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return ''
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isScreenChange():
|
||||
return
|
||||
# detect an change on the screen, we just want to cursor arround, so no change should appear
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isNegativeDelta():
|
||||
return
|
||||
# is a vertical change?
|
||||
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
# is it a horizontal change?
|
||||
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
|
||||
return
|
||||
|
||||
# echo word insteed of char
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
|
||||
if abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) != 1:
|
||||
# get the word
|
||||
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||
x, y, currWord, endOfScreen, lineBreak = \
|
||||
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
|
||||
if self.env['screen']['newCursor']['x'] == x:
|
||||
return
|
||||
x, y, currChar = char_utils.getCurrentChar(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
|
||||
if not currChar.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(currChar, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import char_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return ''
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isScreenChange():
|
||||
return
|
||||
# detect an change on the screen, we just want to cursor arround, so no change should appear
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isNegativeDelta():
|
||||
return
|
||||
# is a vertical change?
|
||||
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
# is it a horizontal change?
|
||||
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
|
||||
return
|
||||
|
||||
# echo word insteed of char
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
|
||||
if abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) != 1:
|
||||
# get the word
|
||||
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||
x, y, currWord, endOfScreen, lineBreak = \
|
||||
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
|
||||
if self.env['screen']['newCursor']['x'] == x:
|
||||
return
|
||||
x, y, currChar = char_utils.getCurrentChar(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
|
||||
if not currChar.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(currChar, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,49 +1,49 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
def run(self):
|
||||
# try to detect the tab completion by cursor change
|
||||
xMove = self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x']
|
||||
if xMove <= 0:
|
||||
return
|
||||
if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']:
|
||||
if not (self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_TAB']]):
|
||||
if xMove < 5:
|
||||
return
|
||||
elif self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']:
|
||||
found = False
|
||||
for currByte in self.env['runtime']['byteManager'].getLastByteKey():
|
||||
if currByte == 9:
|
||||
found = True
|
||||
if not found:
|
||||
if xMove < 5:
|
||||
return
|
||||
# is there any change?
|
||||
if not self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
if not xMove == len(self.env['screen']['newDelta']):
|
||||
return
|
||||
# filter unneded space on word begin
|
||||
currDelta = self.env['screen']['newDelta']
|
||||
if len(currDelta.strip()) != len(currDelta) and \
|
||||
currDelta.strip() != '':
|
||||
currDelta = currDelta.strip()
|
||||
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, announceCapital=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
def run(self):
|
||||
# try to detect the tab completion by cursor change
|
||||
xMove = self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x']
|
||||
if xMove <= 0:
|
||||
return
|
||||
if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']:
|
||||
if not (self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_TAB']]):
|
||||
if xMove < 5:
|
||||
return
|
||||
elif self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']:
|
||||
found = False
|
||||
for currByte in self.env['runtime']['byteManager'].getLastByteKey():
|
||||
if currByte == 9:
|
||||
found = True
|
||||
if not found:
|
||||
if xMove < 5:
|
||||
return
|
||||
# is there any change?
|
||||
if not self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
if not xMove == len(self.env['screen']['newDelta']):
|
||||
return
|
||||
# filter unneded space on word begin
|
||||
currDelta = self.env['screen']['newDelta']
|
||||
if len(currDelta.strip()) != len(currDelta) and \
|
||||
currDelta.strip() != '':
|
||||
currDelta = currDelta.strip()
|
||||
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, announceCapital=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,54 +1,54 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
import string
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
# is navigation?
|
||||
if not abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) > 1:
|
||||
return
|
||||
|
||||
# just when cursor move worddetection is needed
|
||||
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
|
||||
return
|
||||
# for now no new line
|
||||
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
# currently writing
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
|
||||
# get the word
|
||||
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||
x, y, currWord, endOfScreen, lineBreak = \
|
||||
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
|
||||
|
||||
# is there a word?
|
||||
if currWord == '':
|
||||
return
|
||||
|
||||
# at the start of a word
|
||||
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
|
||||
(self.env['screen']['newCursor']['x'] != x):
|
||||
return
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
import string
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
# is navigation?
|
||||
if not abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) > 1:
|
||||
return
|
||||
|
||||
# just when cursor move worddetection is needed
|
||||
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
|
||||
return
|
||||
# for now no new line
|
||||
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
# currently writing
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
|
||||
# get the word
|
||||
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||
x, y, currWord, endOfScreen, lineBreak = \
|
||||
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
|
||||
|
||||
# is there a word?
|
||||
if currWord == '':
|
||||
return
|
||||
|
||||
# at the start of a word
|
||||
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
|
||||
(self.env['screen']['newCursor']['x'] != x):
|
||||
return
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,62 +1,62 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import line_utils
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
self.lastIdent = -1
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return ''
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isScreenChange():
|
||||
self.lastIdent = 0
|
||||
return
|
||||
# this leads to problems in vim -> status line change -> no announcement, so we do check the lengh as hack
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
|
||||
# is a vertical change?
|
||||
if not self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
|
||||
x, y, currLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
|
||||
if currLine.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
|
||||
else:
|
||||
# ident
|
||||
currIdent = len(currLine) - len(currLine.lstrip())
|
||||
if self.lastIdent == -1:
|
||||
self.lastIdent = currIdent
|
||||
doInterrupt = True
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'):
|
||||
if self.env['runtime']['settingsManager'].getSettingAsInt('general', 'autoPresentIndentMode') in [0,1]:
|
||||
self.env['runtime']['outputManager'].playFrequence(currIdent * 50, 0.1, interrupt=doInterrupt)
|
||||
if self.env['runtime']['settingsManager'].getSettingAsInt('general', 'autoPresentIndentMode') in [0,2]:
|
||||
if self.lastIdent != currIdent:
|
||||
self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent) + ' ', interrupt=doInterrupt, flush=False)
|
||||
doInterrupt = False
|
||||
# barrier
|
||||
sayLine = currLine
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('barrier','enabled'):
|
||||
isBarrier, barrierLine = self.env['runtime']['barrierManager'].handleLineBarrier(self.env['screen']['newContentText'].split('\n'), self.env['screen']['newCursor']['x'],self.env['screen']['newCursor']['y'])
|
||||
if isBarrier:
|
||||
sayLine = barrierLine
|
||||
# output
|
||||
self.env['runtime']['outputManager'].presentText(sayLine, interrupt=doInterrupt, flush=False)
|
||||
self.lastIdent = currIdent
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import line_utils
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
self.lastIdent = -1
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return ''
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isScreenChange():
|
||||
self.lastIdent = 0
|
||||
return
|
||||
# this leads to problems in vim -> status line change -> no announcement, so we do check the lengh as hack
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
|
||||
# is a vertical change?
|
||||
if not self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
|
||||
x, y, currLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
|
||||
if currLine.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
|
||||
else:
|
||||
# ident
|
||||
currIdent = len(currLine) - len(currLine.lstrip())
|
||||
if self.lastIdent == -1:
|
||||
self.lastIdent = currIdent
|
||||
doInterrupt = True
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'):
|
||||
if self.env['runtime']['settingsManager'].getSettingAsInt('general', 'autoPresentIndentMode') in [0,1]:
|
||||
self.env['runtime']['outputManager'].playFrequence(currIdent * 50, 0.1, interrupt=doInterrupt)
|
||||
if self.env['runtime']['settingsManager'].getSettingAsInt('general', 'autoPresentIndentMode') in [0,2]:
|
||||
if self.lastIdent != currIdent:
|
||||
self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent) + ' ', interrupt=doInterrupt, flush=False)
|
||||
doInterrupt = False
|
||||
# barrier
|
||||
sayLine = currLine
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('barrier','enabled'):
|
||||
isBarrier, barrierLine = self.env['runtime']['barrierManager'].handleLineBarrier(self.env['screen']['newContentText'].split('\n'), self.env['screen']['newCursor']['x'],self.env['screen']['newCursor']['y'])
|
||||
if isBarrier:
|
||||
sayLine = barrierLine
|
||||
# output
|
||||
self.env['runtime']['outputManager'].presentText(sayLine, interrupt=doInterrupt, flush=False)
|
||||
self.lastIdent = currIdent
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,57 +1,57 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import line_utils
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
self.lastIdent = -1
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return ''
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isScreenChange():
|
||||
self.lastIdent = 0
|
||||
return
|
||||
|
||||
# is a vertical change?
|
||||
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
|
||||
return
|
||||
x, y, currLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
|
||||
currIdent = self.env['screen']['newCursor']['x']
|
||||
|
||||
if not currLine.isspace():
|
||||
# ident
|
||||
lastIdent, lastY, lastLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['oldContentText'])
|
||||
if currLine.strip() != lastLine.strip():
|
||||
return
|
||||
if len(currLine.lstrip()) == len(lastLine.lstrip()):
|
||||
return
|
||||
|
||||
currIdent = len(currLine) - len(currLine.lstrip())
|
||||
|
||||
if self.lastIdent == -1:
|
||||
self.lastIdent = currIdent
|
||||
if currIdent <= 0:
|
||||
return
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'):
|
||||
if self.env['runtime']['settingsManager'].getSettingAsInt('general', 'autoPresentIndentMode') in [0,1]:
|
||||
self.env['runtime']['outputManager'].playFrequence(currIdent * 50, 0.1, interrupt=False)
|
||||
if self.env['runtime']['settingsManager'].getSettingAsInt('general', 'autoPresentIndentMode') in [0,2]:
|
||||
if self.lastIdent != currIdent:
|
||||
self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent) + ' ', interrupt=False, flush=False)
|
||||
self.lastIdent = currIdent
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import line_utils
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
self.lastIdent = -1
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return ''
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isScreenChange():
|
||||
self.lastIdent = 0
|
||||
return
|
||||
|
||||
# is a vertical change?
|
||||
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
|
||||
return
|
||||
x, y, currLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
|
||||
currIdent = self.env['screen']['newCursor']['x']
|
||||
|
||||
if not currLine.isspace():
|
||||
# ident
|
||||
lastIdent, lastY, lastLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['oldContentText'])
|
||||
if currLine.strip() != lastLine.strip():
|
||||
return
|
||||
if len(currLine.lstrip()) == len(lastLine.lstrip()):
|
||||
return
|
||||
|
||||
currIdent = len(currLine) - len(currLine.lstrip())
|
||||
|
||||
if self.lastIdent == -1:
|
||||
self.lastIdent = currIdent
|
||||
if currIdent <= 0:
|
||||
return
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'):
|
||||
if self.env['runtime']['settingsManager'].getSettingAsInt('general', 'autoPresentIndentMode') in [0,1]:
|
||||
self.env['runtime']['outputManager'].playFrequence(currIdent * 50, 0.1, interrupt=False)
|
||||
if self.env['runtime']['settingsManager'].getSettingAsInt('general', 'autoPresentIndentMode') in [0,2]:
|
||||
if self.lastIdent != currIdent:
|
||||
self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent) + ' ', interrupt=False, flush=False)
|
||||
self.lastIdent = currIdent
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,34 +1,34 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import screen_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Reads attributes of current cursor position')
|
||||
def run(self):
|
||||
# is it enabled?
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'):
|
||||
return
|
||||
# is a vertical change?
|
||||
if not (self.env['runtime']['cursorManager'].isCursorVerticalMove() or\
|
||||
self.env['runtime']['cursorManager'].isCursorHorizontalMove()):
|
||||
return
|
||||
|
||||
cursorPos = self.env['screen']['newCursor']
|
||||
|
||||
if not self.env['runtime']['attributeManager'].hasAttributes(cursorPos):
|
||||
return
|
||||
self.env['runtime']['outputManager'].presentText('has attribute', soundIcon='HasAttributes', interrupt=False)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import screen_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Reads attributes of current cursor position')
|
||||
def run(self):
|
||||
# is it enabled?
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'):
|
||||
return
|
||||
# is a vertical change?
|
||||
if not (self.env['runtime']['cursorManager'].isCursorVerticalMove() or\
|
||||
self.env['runtime']['cursorManager'].isCursorHorizontalMove()):
|
||||
return
|
||||
|
||||
cursorPos = self.env['screen']['newCursor']
|
||||
|
||||
if not self.env['runtime']['attributeManager'].hasAttributes(cursorPos):
|
||||
return
|
||||
self.env['runtime']['outputManager'].presentText('has attribute', soundIcon='HasAttributes', interrupt=False)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,26 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('exits review mode')
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('review', 'leaveReviewOnCursorChange'):
|
||||
return
|
||||
if self.env['runtime']['cursorManager'].isReviewMode():
|
||||
self.env['runtime']['cursorManager'].clearReviewCursor()
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('exits review mode')
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('review', 'leaveReviewOnCursorChange'):
|
||||
return
|
||||
if self.env['runtime']['cursorManager'].isReviewMode():
|
||||
self.env['runtime']['cursorManager'].clearReviewCursor()
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,42 +1,42 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
# big changes are no char (but the value is bigger than one maybe the differ needs longer than you can type, so a little strange random buffer for now)
|
||||
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
|
||||
if xMove > 1:
|
||||
return
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charEcho'):
|
||||
return
|
||||
# detect deletion or chilling
|
||||
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']:
|
||||
return
|
||||
# is there any change?
|
||||
if not self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
|
||||
# filter unneded space on word begin
|
||||
currDelta = self.env['screen']['newDelta']
|
||||
if len(currDelta.strip()) != len(currDelta) and \
|
||||
currDelta.strip() != '':
|
||||
currDelta = currDelta.strip()
|
||||
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
# big changes are no char (but the value is bigger than one maybe the differ needs longer than you can type, so a little strange random buffer for now)
|
||||
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
|
||||
if xMove > 1:
|
||||
return
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charEcho'):
|
||||
return
|
||||
# detect deletion or chilling
|
||||
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']:
|
||||
return
|
||||
# is there any change?
|
||||
if not self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
|
||||
# filter unneded space on word begin
|
||||
currDelta = self.env['screen']['newDelta']
|
||||
if len(currDelta.strip()) != len(currDelta) and \
|
||||
currDelta.strip() != '':
|
||||
currDelta = currDelta.strip()
|
||||
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,42 +1,42 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
# try to detect the tab completion by cursor change
|
||||
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
|
||||
if xMove == 1:
|
||||
return
|
||||
# is there any change?
|
||||
if not self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
if not( (xMove > 1) and xMove == len(self.env['screen']['newDelta'])):
|
||||
return
|
||||
# detect deletion or chilling
|
||||
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']:
|
||||
return
|
||||
|
||||
# filter unneded space on word begin
|
||||
currDelta = self.env['screen']['newDelta']
|
||||
if len(currDelta.strip()) != len(currDelta) and \
|
||||
currDelta.strip() != '':
|
||||
currDelta = currDelta.strip()
|
||||
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, announceCapital=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
# try to detect the tab completion by cursor change
|
||||
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
|
||||
if xMove == 1:
|
||||
return
|
||||
# is there any change?
|
||||
if not self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
if not( (xMove > 1) and xMove == len(self.env['screen']['newDelta'])):
|
||||
return
|
||||
# detect deletion or chilling
|
||||
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']:
|
||||
return
|
||||
|
||||
# filter unneded space on word begin
|
||||
currDelta = self.env['screen']['newDelta']
|
||||
if len(currDelta.strip()) != len(currDelta) and \
|
||||
currDelta.strip() != '':
|
||||
currDelta = currDelta.strip()
|
||||
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, announceCapital=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,51 +1,51 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import char_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return ''
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isScreenChange():
|
||||
return
|
||||
# detect an change on the screen, we just want to cursor arround, so no change should appear
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isNegativeDelta():
|
||||
return
|
||||
# is a vertical change?
|
||||
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
# is it a horizontal change?
|
||||
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
|
||||
return
|
||||
|
||||
# echo word insteed of char
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
|
||||
if abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) != 1:
|
||||
# get the word
|
||||
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||
x, y, currWord, endOfScreen, lineBreak = \
|
||||
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
|
||||
if self.env['screen']['newCursor']['x'] == x:
|
||||
return
|
||||
x, y, currChar = char_utils.getCurrentChar(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
|
||||
if not currChar.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(currChar, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import char_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return ''
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isScreenChange():
|
||||
return
|
||||
# detect an change on the screen, we just want to cursor arround, so no change should appear
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isNegativeDelta():
|
||||
return
|
||||
# is a vertical change?
|
||||
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
# is it a horizontal change?
|
||||
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
|
||||
return
|
||||
|
||||
# echo word insteed of char
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
|
||||
if abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) != 1:
|
||||
# get the word
|
||||
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||
x, y, currWord, endOfScreen, lineBreak = \
|
||||
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
|
||||
if self.env['screen']['newCursor']['x'] == x:
|
||||
return
|
||||
x, y, currChar = char_utils.getCurrentChar(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
|
||||
if not currChar.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(currChar, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,59 +1,59 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import line_utils
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
self.lastIdent = -1
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return ''
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isScreenChange():
|
||||
self.lastIdent = 0
|
||||
return
|
||||
# this leads to problems in vim -> status line change -> no announcement, so we do check the lengh as hack
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
|
||||
# is a vertical change?
|
||||
if not self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
|
||||
x, y, currLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
|
||||
if currLine.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
|
||||
else:
|
||||
# ident
|
||||
currIdent = len(currLine) - len(currLine.lstrip())
|
||||
if self.lastIdent == -1:
|
||||
self.lastIdent = currIdent
|
||||
doInterrupt = True
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'):
|
||||
if self.lastIdent != currIdent:
|
||||
self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent) + ' ', interrupt=doInterrupt, flush=False)
|
||||
doInterrupt = False
|
||||
# barrier
|
||||
sayLine = currLine
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('barrier','enabled'):
|
||||
isBarrier, barrierLine = self.env['runtime']['barrierManager'].handleLineBarrier(self.env['screen']['newContentText'].split('\n'), self.env['screen']['newCursor']['x'],self.env['screen']['newCursor']['y'])
|
||||
if isBarrier:
|
||||
sayLine = barrierLine
|
||||
# output
|
||||
self.env['runtime']['outputManager'].presentText(sayLine, interrupt=doInterrupt, flush=False)
|
||||
self.lastIdent = currIdent
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import line_utils
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
self.lastIdent = -1
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return ''
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isScreenChange():
|
||||
self.lastIdent = 0
|
||||
return
|
||||
# this leads to problems in vim -> status line change -> no announcement, so we do check the lengh as hack
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
|
||||
# is a vertical change?
|
||||
if not self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
|
||||
x, y, currLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
|
||||
if currLine.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
|
||||
else:
|
||||
# ident
|
||||
currIdent = len(currLine) - len(currLine.lstrip())
|
||||
if self.lastIdent == -1:
|
||||
self.lastIdent = currIdent
|
||||
doInterrupt = True
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'):
|
||||
if self.lastIdent != currIdent:
|
||||
self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent) + ' ', interrupt=doInterrupt, flush=False)
|
||||
doInterrupt = False
|
||||
# barrier
|
||||
sayLine = currLine
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('barrier','enabled'):
|
||||
isBarrier, barrierLine = self.env['runtime']['barrierManager'].handleLineBarrier(self.env['screen']['newContentText'].split('\n'), self.env['screen']['newCursor']['x'],self.env['screen']['newCursor']['y'])
|
||||
if isBarrier:
|
||||
sayLine = barrierLine
|
||||
# output
|
||||
self.env['runtime']['outputManager'].presentText(sayLine, interrupt=doInterrupt, flush=False)
|
||||
self.lastIdent = currIdent
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,58 +1,58 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
import string
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
# is it enabled?
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
|
||||
return
|
||||
# is naviation?
|
||||
if self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'] != 1:
|
||||
return
|
||||
# just when cursor move worddetection is needed
|
||||
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
|
||||
return
|
||||
# for now no new line
|
||||
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
# currently writing
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
|
||||
# get the word
|
||||
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||
x, y, currWord, endOfScreen, lineBreak = \
|
||||
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
|
||||
|
||||
# is there a word?
|
||||
if currWord == '':
|
||||
return
|
||||
# at the end of a word
|
||||
if not newContent[self.env['screen']['newCursor']['x']].isspace():
|
||||
return
|
||||
# at the end of a word
|
||||
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
|
||||
(x + len(currWord) != self.env['screen']['newCursor']['x']-1):
|
||||
return
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
import string
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
# is it enabled?
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
|
||||
return
|
||||
# is naviation?
|
||||
if self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'] != 1:
|
||||
return
|
||||
# just when cursor move worddetection is needed
|
||||
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
|
||||
return
|
||||
# for now no new line
|
||||
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
# currently writing
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
|
||||
# get the word
|
||||
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||
x, y, currWord, endOfScreen, lineBreak = \
|
||||
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
|
||||
|
||||
# is there a word?
|
||||
if currWord == '':
|
||||
return
|
||||
# at the end of a word
|
||||
if not newContent[self.env['screen']['newCursor']['x']].isspace():
|
||||
return
|
||||
# at the end of a word
|
||||
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
|
||||
(x + len(currWord) != self.env['screen']['newCursor']['x']-1):
|
||||
return
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,54 +1,54 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
import string
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
# is navigation?
|
||||
if not abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) > 1:
|
||||
return
|
||||
|
||||
# just when cursor move worddetection is needed
|
||||
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
|
||||
return
|
||||
# for now no new line
|
||||
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
# currently writing
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
|
||||
# get the word
|
||||
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||
x, y, currWord, endOfScreen, lineBreak = \
|
||||
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
|
||||
|
||||
# is there a word?
|
||||
if currWord == '':
|
||||
return
|
||||
|
||||
# at the start of a word
|
||||
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
|
||||
(self.env['screen']['newCursor']['x'] != x):
|
||||
return
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
import string
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
# is navigation?
|
||||
if not abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) > 1:
|
||||
return
|
||||
|
||||
# just when cursor move worddetection is needed
|
||||
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
|
||||
return
|
||||
# for now no new line
|
||||
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
# currently writing
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
|
||||
# get the word
|
||||
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||
x, y, currWord, endOfScreen, lineBreak = \
|
||||
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
|
||||
|
||||
# is there a word?
|
||||
if currWord == '':
|
||||
return
|
||||
|
||||
# at the start of a word
|
||||
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
|
||||
(self.env['screen']['newCursor']['x'] != x):
|
||||
return
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,46 +1,46 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charDeleteEcho'):
|
||||
return
|
||||
# detect typing or chilling
|
||||
if self.env['screen']['newCursor']['x'] >= self.env['screen']['oldCursor']['x']:
|
||||
return
|
||||
|
||||
# More than just a deletion happend
|
||||
if self.env['runtime']['screenManager'].isDelta(ignoreSpace=True):
|
||||
return
|
||||
|
||||
# no deletion
|
||||
if not self.env['runtime']['screenManager'].isNegativeDelta():
|
||||
return
|
||||
|
||||
# too much for a single backspace...
|
||||
# word begin produce a diff wiht len == 2 |a | others with 1 |a|
|
||||
if len(self.env['screen']['newNegativeDelta']) > 2:
|
||||
return
|
||||
|
||||
currNegativeDelta = self.env['screen']['newNegativeDelta']
|
||||
if len(currNegativeDelta.strip()) != len(currNegativeDelta) and \
|
||||
currNegativeDelta.strip() != '':
|
||||
currNegativeDelta = currNegativeDelta.strip()
|
||||
self.env['runtime']['outputManager'].presentText(currNegativeDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charDeleteEcho'):
|
||||
return
|
||||
# detect typing or chilling
|
||||
if self.env['screen']['newCursor']['x'] >= self.env['screen']['oldCursor']['x']:
|
||||
return
|
||||
|
||||
# More than just a deletion happend
|
||||
if self.env['runtime']['screenManager'].isDelta(ignoreSpace=True):
|
||||
return
|
||||
|
||||
# no deletion
|
||||
if not self.env['runtime']['screenManager'].isNegativeDelta():
|
||||
return
|
||||
|
||||
# too much for a single backspace...
|
||||
# word begin produce a diff wiht len == 2 |a | others with 1 |a|
|
||||
if len(self.env['screen']['newNegativeDelta']) > 2:
|
||||
return
|
||||
|
||||
currNegativeDelta = self.env['screen']['newNegativeDelta']
|
||||
if len(currNegativeDelta.strip()) != len(currNegativeDelta) and \
|
||||
currNegativeDelta.strip() != '':
|
||||
currNegativeDelta = currNegativeDelta.strip()
|
||||
self.env['runtime']['outputManager'].presentText(currNegativeDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,26 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('exits review mode')
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('review', 'leaveReviewOnCursorChange'):
|
||||
return
|
||||
if self.env['runtime']['cursorManager'].isReviewMode():
|
||||
self.env['runtime']['cursorManager'].clearReviewCursor()
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('exits review mode')
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('review', 'leaveReviewOnCursorChange'):
|
||||
return
|
||||
if self.env['runtime']['cursorManager'].isReviewMode():
|
||||
self.env['runtime']['cursorManager'].clearReviewCursor()
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,34 +1,34 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import screen_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Reads attributes of current cursor position')
|
||||
def run(self):
|
||||
# is it enabled?
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'):
|
||||
return
|
||||
# is a vertical change?
|
||||
if not (self.env['runtime']['cursorManager'].isCursorVerticalMove() or\
|
||||
self.env['runtime']['cursorManager'].isCursorHorizontalMove()):
|
||||
return
|
||||
|
||||
cursorPos = self.env['screen']['newCursor']
|
||||
|
||||
if not self.env['runtime']['attributeManager'].hasAttributes(cursorPos):
|
||||
return
|
||||
self.env['runtime']['outputManager'].presentText('has attribute', soundIcon='HasAttributes', interrupt=False)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import screen_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Reads attributes of current cursor position')
|
||||
def run(self):
|
||||
# is it enabled?
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'):
|
||||
return
|
||||
# is a vertical change?
|
||||
if not (self.env['runtime']['cursorManager'].isCursorVerticalMove() or\
|
||||
self.env['runtime']['cursorManager'].isCursorHorizontalMove()):
|
||||
return
|
||||
|
||||
cursorPos = self.env['screen']['newCursor']
|
||||
|
||||
if not self.env['runtime']['attributeManager'].hasAttributes(cursorPos):
|
||||
return
|
||||
self.env['runtime']['outputManager'].presentText('has attribute', soundIcon='HasAttributes', interrupt=False)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,42 +1,42 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
# big changes are no char (but the value is bigger than one maybe the differ needs longer than you can type, so a little strange random buffer for now)
|
||||
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
|
||||
if xMove > 1:
|
||||
return
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charEcho'):
|
||||
return
|
||||
# detect deletion or chilling
|
||||
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']:
|
||||
return
|
||||
# is there any change?
|
||||
if not self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
|
||||
# filter unneded space on word begin
|
||||
currDelta = self.env['screen']['newDelta']
|
||||
if len(currDelta.strip()) != len(currDelta) and \
|
||||
currDelta.strip() != '':
|
||||
currDelta = currDelta.strip()
|
||||
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
# big changes are no char (but the value is bigger than one maybe the differ needs longer than you can type, so a little strange random buffer for now)
|
||||
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
|
||||
if xMove > 1:
|
||||
return
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charEcho'):
|
||||
return
|
||||
# detect deletion or chilling
|
||||
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']:
|
||||
return
|
||||
# is there any change?
|
||||
if not self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
|
||||
# filter unneded space on word begin
|
||||
currDelta = self.env['screen']['newDelta']
|
||||
if len(currDelta.strip()) != len(currDelta) and \
|
||||
currDelta.strip() != '':
|
||||
currDelta = currDelta.strip()
|
||||
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,58 +1,58 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
import string
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
# is it enabled?
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
|
||||
return
|
||||
# is naviation?
|
||||
if self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'] != 1:
|
||||
return
|
||||
# just when cursor move worddetection is needed
|
||||
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
|
||||
return
|
||||
# for now no new line
|
||||
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
# currently writing
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
|
||||
# get the word
|
||||
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||
x, y, currWord, endOfScreen, lineBreak = \
|
||||
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
|
||||
|
||||
# is there a word?
|
||||
if currWord == '':
|
||||
return
|
||||
# at the end of a word
|
||||
if not newContent[self.env['screen']['newCursor']['x']].isspace():
|
||||
return
|
||||
# at the end of a word
|
||||
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
|
||||
(x + len(currWord) != self.env['screen']['newCursor']['x']-1):
|
||||
return
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
import string
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
# is it enabled?
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
|
||||
return
|
||||
# is naviation?
|
||||
if self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'] != 1:
|
||||
return
|
||||
# just when cursor move worddetection is needed
|
||||
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
|
||||
return
|
||||
# for now no new line
|
||||
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
# currently writing
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
|
||||
# get the word
|
||||
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||
x, y, currWord, endOfScreen, lineBreak = \
|
||||
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
|
||||
|
||||
# is there a word?
|
||||
if currWord == '':
|
||||
return
|
||||
# at the end of a word
|
||||
if not newContent[self.env['screen']['newCursor']['x']].isspace():
|
||||
return
|
||||
# at the end of a word
|
||||
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
|
||||
(x + len(currWord) != self.env['screen']['newCursor']['x']-1):
|
||||
return
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,46 +1,46 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charDeleteEcho'):
|
||||
return
|
||||
# detect typing or chilling
|
||||
if self.env['screen']['newCursor']['x'] >= self.env['screen']['oldCursor']['x']:
|
||||
return
|
||||
|
||||
# More than just a deletion happend
|
||||
if self.env['runtime']['screenManager'].isDelta(ignoreSpace=True):
|
||||
return
|
||||
|
||||
# no deletion
|
||||
if not self.env['runtime']['screenManager'].isNegativeDelta():
|
||||
return
|
||||
|
||||
# too much for a single backspace...
|
||||
# word begin produce a diff wiht len == 2 |a | others with 1 |a|
|
||||
if len(self.env['screen']['newNegativeDelta']) > 2:
|
||||
return
|
||||
|
||||
currNegativeDelta = self.env['screen']['newNegativeDelta']
|
||||
if len(currNegativeDelta.strip()) != len(currNegativeDelta) and \
|
||||
currNegativeDelta.strip() != '':
|
||||
currNegativeDelta = currNegativeDelta.strip()
|
||||
self.env['runtime']['outputManager'].presentText(currNegativeDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charDeleteEcho'):
|
||||
return
|
||||
# detect typing or chilling
|
||||
if self.env['screen']['newCursor']['x'] >= self.env['screen']['oldCursor']['x']:
|
||||
return
|
||||
|
||||
# More than just a deletion happend
|
||||
if self.env['runtime']['screenManager'].isDelta(ignoreSpace=True):
|
||||
return
|
||||
|
||||
# no deletion
|
||||
if not self.env['runtime']['screenManager'].isNegativeDelta():
|
||||
return
|
||||
|
||||
# too much for a single backspace...
|
||||
# word begin produce a diff wiht len == 2 |a | others with 1 |a|
|
||||
if len(self.env['screen']['newNegativeDelta']) > 2:
|
||||
return
|
||||
|
||||
currNegativeDelta = self.env['screen']['newNegativeDelta']
|
||||
if len(currNegativeDelta.strip()) != len(currNegativeDelta) and \
|
||||
currNegativeDelta.strip() != '':
|
||||
currNegativeDelta = currNegativeDelta.strip()
|
||||
self.env['runtime']['outputManager'].presentText(currNegativeDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,51 +1,51 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import char_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return ''
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isScreenChange():
|
||||
return
|
||||
# detect an change on the screen, we just want to cursor arround, so no change should appear
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isNegativeDelta():
|
||||
return
|
||||
# is a vertical change?
|
||||
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
# is it a horizontal change?
|
||||
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
|
||||
return
|
||||
|
||||
# echo word insteed of char
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
|
||||
if abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) != 1:
|
||||
# get the word
|
||||
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||
x, y, currWord, endOfScreen, lineBreak = \
|
||||
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
|
||||
if self.env['screen']['newCursor']['x'] == x:
|
||||
return
|
||||
x, y, currChar = char_utils.getCurrentChar(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
|
||||
if not currChar.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(currChar, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import char_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return ''
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isScreenChange():
|
||||
return
|
||||
# detect an change on the screen, we just want to cursor arround, so no change should appear
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isNegativeDelta():
|
||||
return
|
||||
# is a vertical change?
|
||||
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
# is it a horizontal change?
|
||||
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
|
||||
return
|
||||
|
||||
# echo word insteed of char
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
|
||||
if abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) != 1:
|
||||
# get the word
|
||||
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||
x, y, currWord, endOfScreen, lineBreak = \
|
||||
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
|
||||
if self.env['screen']['newCursor']['x'] == x:
|
||||
return
|
||||
x, y, currChar = char_utils.getCurrentChar(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
|
||||
if not currChar.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(currChar, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,42 +1,42 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
# try to detect the tab completion by cursor change
|
||||
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
|
||||
if xMove == 1:
|
||||
return
|
||||
# is there any change?
|
||||
if not self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
if not( (xMove > 1) and xMove == len(self.env['screen']['newDelta'])):
|
||||
return
|
||||
# detect deletion or chilling
|
||||
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']:
|
||||
return
|
||||
|
||||
# filter unneded space on word begin
|
||||
currDelta = self.env['screen']['newDelta']
|
||||
if len(currDelta.strip()) != len(currDelta) and \
|
||||
currDelta.strip() != '':
|
||||
currDelta = currDelta.strip()
|
||||
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, announceCapital=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
# try to detect the tab completion by cursor change
|
||||
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
|
||||
if xMove == 1:
|
||||
return
|
||||
# is there any change?
|
||||
if not self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
if not( (xMove > 1) and xMove == len(self.env['screen']['newDelta'])):
|
||||
return
|
||||
# detect deletion or chilling
|
||||
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']:
|
||||
return
|
||||
|
||||
# filter unneded space on word begin
|
||||
currDelta = self.env['screen']['newDelta']
|
||||
if len(currDelta.strip()) != len(currDelta) and \
|
||||
currDelta.strip() != '':
|
||||
currDelta = currDelta.strip()
|
||||
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, announceCapital=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,54 +1,54 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
import string
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
# is navigation?
|
||||
if not abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) > 1:
|
||||
return
|
||||
|
||||
# just when cursor move worddetection is needed
|
||||
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
|
||||
return
|
||||
# for now no new line
|
||||
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
# currently writing
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
|
||||
# get the word
|
||||
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||
x, y, currWord, endOfScreen, lineBreak = \
|
||||
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
|
||||
|
||||
# is there a word?
|
||||
if currWord == '':
|
||||
return
|
||||
|
||||
# at the start of a word
|
||||
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
|
||||
(self.env['screen']['newCursor']['x'] != x):
|
||||
return
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
import string
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
# is navigation?
|
||||
if not abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) > 1:
|
||||
return
|
||||
|
||||
# just when cursor move worddetection is needed
|
||||
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
|
||||
return
|
||||
# for now no new line
|
||||
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
# currently writing
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
|
||||
# get the word
|
||||
newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||
x, y, currWord, endOfScreen, lineBreak = \
|
||||
word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
|
||||
|
||||
# is there a word?
|
||||
if currWord == '':
|
||||
return
|
||||
|
||||
# at the start of a word
|
||||
if (x + len(currWord) != self.env['screen']['newCursor']['x']) and \
|
||||
(self.env['screen']['newCursor']['x'] != x):
|
||||
return
|
||||
|
||||
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,59 +1,59 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import line_utils
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
self.lastIdent = -1
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return ''
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isScreenChange():
|
||||
self.lastIdent = 0
|
||||
return
|
||||
# this leads to problems in vim -> status line change -> no announcement, so we do check the lengh as hack
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
|
||||
# is a vertical change?
|
||||
if not self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
|
||||
x, y, currLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
|
||||
if currLine.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
|
||||
else:
|
||||
# ident
|
||||
currIdent = len(currLine) - len(currLine.lstrip())
|
||||
if self.lastIdent == -1:
|
||||
self.lastIdent = currIdent
|
||||
doInterrupt = True
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'):
|
||||
if self.lastIdent != currIdent:
|
||||
self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent) + ' ', interrupt=doInterrupt, flush=False)
|
||||
doInterrupt = False
|
||||
# barrier
|
||||
sayLine = currLine
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('barrier','enabled'):
|
||||
isBarrier, barrierLine = self.env['runtime']['barrierManager'].handleLineBarrier(self.env['screen']['newContentText'].split('\n'), self.env['screen']['newCursor']['x'],self.env['screen']['newCursor']['y'])
|
||||
if isBarrier:
|
||||
sayLine = barrierLine
|
||||
# output
|
||||
self.env['runtime']['outputManager'].presentText(sayLine, interrupt=doInterrupt, flush=False)
|
||||
self.lastIdent = currIdent
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import line_utils
|
||||
from fenrirscreenreader.utils import word_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
self.lastIdent = -1
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return ''
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isScreenChange():
|
||||
self.lastIdent = 0
|
||||
return
|
||||
# this leads to problems in vim -> status line change -> no announcement, so we do check the lengh as hack
|
||||
if self.env['runtime']['screenManager'].isDelta():
|
||||
return
|
||||
|
||||
# is a vertical change?
|
||||
if not self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
|
||||
x, y, currLine = line_utils.getCurrentLine(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
|
||||
if currLine.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
|
||||
else:
|
||||
# ident
|
||||
currIdent = len(currLine) - len(currLine.lstrip())
|
||||
if self.lastIdent == -1:
|
||||
self.lastIdent = currIdent
|
||||
doInterrupt = True
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoPresentIndent'):
|
||||
if self.lastIdent != currIdent:
|
||||
self.env['runtime']['outputManager'].presentText(_('indented ') + str(currIdent) + ' ', interrupt=doInterrupt, flush=False)
|
||||
doInterrupt = False
|
||||
# barrier
|
||||
sayLine = currLine
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('barrier','enabled'):
|
||||
isBarrier, barrierLine = self.env['runtime']['barrierManager'].handleLineBarrier(self.env['screen']['newContentText'].split('\n'), self.env['screen']['newCursor']['x'],self.env['screen']['newCursor']['y'])
|
||||
if isBarrier:
|
||||
sayLine = barrierLine
|
||||
# output
|
||||
self.env['runtime']['outputManager'].presentText(sayLine, interrupt=doInterrupt, flush=False)
|
||||
self.lastIdent = currIdent
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,34 +1,34 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import screen_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Reads attributes of current cursor position')
|
||||
def run(self):
|
||||
# is it enabled?
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'):
|
||||
return
|
||||
# is a vertical change?
|
||||
if not (self.env['runtime']['cursorManager'].isCursorVerticalMove() or\
|
||||
self.env['runtime']['cursorManager'].isCursorHorizontalMove()):
|
||||
return
|
||||
|
||||
cursorPos = self.env['screen']['newCursor']
|
||||
|
||||
if not self.env['runtime']['attributeManager'].hasAttributes(cursorPos):
|
||||
return
|
||||
self.env['runtime']['outputManager'].presentText('has attribute', soundIcon='HasAttributes', interrupt=False)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import screen_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('Reads attributes of current cursor position')
|
||||
def run(self):
|
||||
# is it enabled?
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'):
|
||||
return
|
||||
# is a vertical change?
|
||||
if not (self.env['runtime']['cursorManager'].isCursorVerticalMove() or\
|
||||
self.env['runtime']['cursorManager'].isCursorHorizontalMove()):
|
||||
return
|
||||
|
||||
cursorPos = self.env['screen']['newCursor']
|
||||
|
||||
if not self.env['runtime']['attributeManager'].hasAttributes(cursorPos):
|
||||
return
|
||||
self.env['runtime']['outputManager'].presentText('has attribute', soundIcon='HasAttributes', interrupt=False)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,26 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('exits review mode')
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('review', 'leaveReviewOnCursorChange'):
|
||||
return
|
||||
if self.env['runtime']['cursorManager'].isReviewMode():
|
||||
self.env['runtime']['cursorManager'].clearReviewCursor()
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('exits review mode')
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('review', 'leaveReviewOnCursorChange'):
|
||||
return
|
||||
if self.env['runtime']['cursorManager'].isReviewMode():
|
||||
self.env['runtime']['cursorManager'].clearReviewCursor()
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,29 +1,29 @@
|
||||
#!/usr/bin/env python3
|
||||
import time
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import time
|
||||
import datetime
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
self.lastTime = datetime.datetime.now()
|
||||
self.lastDateString = ''
|
||||
self.lastTimeString = ''
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['screenDriver'].getSessionInformation()
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
import time
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import time
|
||||
import datetime
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
self.lastTime = datetime.datetime.now()
|
||||
self.lastDateString = ''
|
||||
self.lastTimeString = ''
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['screenDriver'].getSessionInformation()
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,85 +1,85 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import time
|
||||
import datetime
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
self.lastTime = datetime.datetime.now()
|
||||
self.lastDateString = ''
|
||||
self.lastTimeString = ''
|
||||
|
||||
def shutdown(self):
|
||||
pass
|
||||
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('time', 'enabled'):
|
||||
return
|
||||
|
||||
onMinutes = self.env['runtime']['settingsManager'].getSetting('time', 'onMinutes')
|
||||
delaySec = self.env['runtime']['settingsManager'].getSettingAsInt('time', 'delaySec')
|
||||
|
||||
# no need
|
||||
if onMinutes == '' and delaySec <= 0:
|
||||
return
|
||||
|
||||
onMinutes = onMinutes.split(',')
|
||||
now = datetime.datetime.now()
|
||||
|
||||
# ignore onMinutes if there is a delaySec
|
||||
if delaySec > 0:
|
||||
if int((now - self.lastTime).total_seconds()) < delaySec:
|
||||
return
|
||||
else:
|
||||
# should announce?
|
||||
if not str(now.minute).zfill(2) in onMinutes:
|
||||
return
|
||||
# already announced?
|
||||
if now.hour == self.lastTime.hour:
|
||||
if now.minute == self.lastTime.minute:
|
||||
return
|
||||
|
||||
dateFormat = self.env['runtime']['settingsManager'].getSetting('general', 'dateFormat')
|
||||
dateString = datetime.datetime.strftime(now, dateFormat)
|
||||
|
||||
presentDate = self.env['runtime']['settingsManager'].getSettingAsBool('time', 'presentDate') and \
|
||||
self.lastDateString != dateString
|
||||
presentTime = self.env['runtime']['settingsManager'].getSettingAsBool('time', 'presentTime')
|
||||
|
||||
# no changed value to announce
|
||||
if not (presentDate or presentTime):
|
||||
return
|
||||
|
||||
timeFormat = self.env['runtime']['settingsManager'].getSetting('general', 'timeFormat')
|
||||
timeString = datetime.datetime.strftime(now, timeFormat)
|
||||
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('time', 'interrupt'):
|
||||
self.env['runtime']['outputManager'].interruptOutput()
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('time', 'announce'):
|
||||
self.env['runtime']['outputManager'].playSoundIcon('announce')
|
||||
|
||||
if presentTime:
|
||||
# present the time
|
||||
self.env['runtime']['outputManager'].presentText(_("It's {0}").format(timeString.replace(':00', " O'clock ").lstrip('0')), soundIcon='', interrupt=False)
|
||||
# Check if it's 12:00 AM
|
||||
if now.hour == 0 and now.minute == 0:
|
||||
# present the date
|
||||
self.env['runtime']['outputManager'].presentText(dateString, soundIcon='', interrupt=False)
|
||||
|
||||
self.lastTime = datetime.datetime.now()
|
||||
self.lastTimeString = timeString
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import time
|
||||
import datetime
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
self.lastTime = datetime.datetime.now()
|
||||
self.lastDateString = ''
|
||||
self.lastTimeString = ''
|
||||
|
||||
def shutdown(self):
|
||||
pass
|
||||
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('time', 'enabled'):
|
||||
return
|
||||
|
||||
onMinutes = self.env['runtime']['settingsManager'].getSetting('time', 'onMinutes')
|
||||
delaySec = self.env['runtime']['settingsManager'].getSettingAsInt('time', 'delaySec')
|
||||
|
||||
# no need
|
||||
if onMinutes == '' and delaySec <= 0:
|
||||
return
|
||||
|
||||
onMinutes = onMinutes.split(',')
|
||||
now = datetime.datetime.now()
|
||||
|
||||
# ignore onMinutes if there is a delaySec
|
||||
if delaySec > 0:
|
||||
if int((now - self.lastTime).total_seconds()) < delaySec:
|
||||
return
|
||||
else:
|
||||
# should announce?
|
||||
if not str(now.minute).zfill(2) in onMinutes:
|
||||
return
|
||||
# already announced?
|
||||
if now.hour == self.lastTime.hour:
|
||||
if now.minute == self.lastTime.minute:
|
||||
return
|
||||
|
||||
dateFormat = self.env['runtime']['settingsManager'].getSetting('general', 'dateFormat')
|
||||
dateString = datetime.datetime.strftime(now, dateFormat)
|
||||
|
||||
presentDate = self.env['runtime']['settingsManager'].getSettingAsBool('time', 'presentDate') and \
|
||||
self.lastDateString != dateString
|
||||
presentTime = self.env['runtime']['settingsManager'].getSettingAsBool('time', 'presentTime')
|
||||
|
||||
# no changed value to announce
|
||||
if not (presentDate or presentTime):
|
||||
return
|
||||
|
||||
timeFormat = self.env['runtime']['settingsManager'].getSetting('general', 'timeFormat')
|
||||
timeString = datetime.datetime.strftime(now, timeFormat)
|
||||
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('time', 'interrupt'):
|
||||
self.env['runtime']['outputManager'].interruptOutput()
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('time', 'announce'):
|
||||
self.env['runtime']['outputManager'].playSoundIcon('announce')
|
||||
|
||||
if presentTime:
|
||||
# present the time
|
||||
self.env['runtime']['outputManager'].presentText(_("It's {0}").format(timeString.replace(':00', " O'clock ").lstrip('0')), soundIcon='', interrupt=False)
|
||||
# Check if it's 12:00 AM
|
||||
if now.hour == 0 and now.minute == 0:
|
||||
# present the date
|
||||
self.env['runtime']['outputManager'].presentText(dateString, soundIcon='', interrupt=False)
|
||||
|
||||
self.lastTime = datetime.datetime.now()
|
||||
self.lastTimeString = timeString
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,26 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
import time
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import time
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
print(time.time())
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
import time
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import time
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
print(time.time())
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,37 +1,37 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return ''
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'interruptOnKeyPress'):
|
||||
return
|
||||
if self.env['runtime']['inputManager'].noKeyPressed():
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isScreenChange():
|
||||
return
|
||||
if len(self.env['input']['currInput']) <= len(self.env['input']['prevInput']):
|
||||
return
|
||||
# if the filter is set
|
||||
if self.env['runtime']['settingsManager'].getSetting('keyboard', 'interruptOnKeyPressFilter').strip() != '':
|
||||
filterList = self.env['runtime']['settingsManager'].getSetting('keyboard', 'interruptOnKeyPressFilter').split(',')
|
||||
for currInput in self.env['input']['currInput']:
|
||||
if not currInput in filterList:
|
||||
return
|
||||
self.env['runtime']['outputManager'].interruptOutput()
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return ''
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'interruptOnKeyPress'):
|
||||
return
|
||||
if self.env['runtime']['inputManager'].noKeyPressed():
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isScreenChange():
|
||||
return
|
||||
if len(self.env['input']['currInput']) <= len(self.env['input']['prevInput']):
|
||||
return
|
||||
# if the filter is set
|
||||
if self.env['runtime']['settingsManager'].getSetting('keyboard', 'interruptOnKeyPressFilter').strip() != '':
|
||||
filterList = self.env['runtime']['settingsManager'].getSetting('keyboard', 'interruptOnKeyPressFilter').split(',')
|
||||
for currInput in self.env['input']['currInput']:
|
||||
if not currInput in filterList:
|
||||
return
|
||||
self.env['runtime']['outputManager'].interruptOutput()
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,31 +1,31 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('disables speech until next keypress')
|
||||
|
||||
def run(self):
|
||||
if self.env['runtime']['inputManager'].noKeyPressed():
|
||||
return
|
||||
if len(self.env['input']['prevInput']) >0:
|
||||
return
|
||||
if not self.env['commandBuffer']['enableSpeechOnKeypress']:
|
||||
return
|
||||
self.env['runtime']['settingsManager'].setSetting('speech', 'enabled', str(self.env['commandBuffer']['enableSpeechOnKeypress']))
|
||||
self.env['commandBuffer']['enableSpeechOnKeypress'] = False
|
||||
self.env['runtime']['outputManager'].presentText(_("speech enabled"), soundIcon='SpeechOn', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('disables speech until next keypress')
|
||||
|
||||
def run(self):
|
||||
if self.env['runtime']['inputManager'].noKeyPressed():
|
||||
return
|
||||
if len(self.env['input']['prevInput']) >0:
|
||||
return
|
||||
if not self.env['commandBuffer']['enableSpeechOnKeypress']:
|
||||
return
|
||||
self.env['runtime']['settingsManager'].setSetting('speech', 'enabled', str(self.env['commandBuffer']['enableSpeechOnKeypress']))
|
||||
self.env['commandBuffer']['enableSpeechOnKeypress'] = False
|
||||
self.env['runtime']['outputManager'].presentText(_("speech enabled"), soundIcon='SpeechOn', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,27 +1,27 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No description found'
|
||||
def run(self):
|
||||
if self.env['input']['oldCapsLock'] == self.env['input']['newCapsLock']:
|
||||
return
|
||||
if self.env['input']['newCapsLock']:
|
||||
self.env['runtime']['outputManager'].presentText(_("Capslock on"), interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_("Capslock off"), interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No description found'
|
||||
def run(self):
|
||||
if self.env['input']['oldCapsLock'] == self.env['input']['newCapsLock']:
|
||||
return
|
||||
if self.env['input']['newCapsLock']:
|
||||
self.env['runtime']['outputManager'].presentText(_("Capslock on"), interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_("Capslock off"), interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,27 +1,27 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No description found'
|
||||
def run(self):
|
||||
if self.env['input']['oldScrollLock'] == self.env['input']['newScrollLock']:
|
||||
return
|
||||
if self.env['input']['newScrollLock']:
|
||||
self.env['runtime']['outputManager'].presentText(_("Scrolllock on"), interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_("Scrolllock off"), interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No description found'
|
||||
def run(self):
|
||||
if self.env['input']['oldScrollLock'] == self.env['input']['newScrollLock']:
|
||||
return
|
||||
if self.env['input']['newScrollLock']:
|
||||
self.env['runtime']['outputManager'].presentText(_("Scrolllock on"), interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_("Scrolllock off"), interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,27 +1,27 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No description found'
|
||||
def run(self):
|
||||
if self.env['input']['oldNumLock'] == self.env['input']['newNumLock']:
|
||||
return
|
||||
if self.env['input']['newNumLock']:
|
||||
self.env['runtime']['outputManager'].presentText(_("Numlock on"), interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_("Numlock off"), interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No description found'
|
||||
def run(self):
|
||||
if self.env['input']['oldNumLock'] == self.env['input']['newNumLock']:
|
||||
return
|
||||
if self.env['input']['newNumLock']:
|
||||
self.env['runtime']['outputManager'].presentText(_("Numlock on"), interrupt=True)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(_("Numlock off"), interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,23 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No description found'
|
||||
def run(self):
|
||||
if self.env['runtime']['helpManager'].isTutorialMode():
|
||||
self.env['runtime']['inputManager'].keyEcho()
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No description found'
|
||||
def run(self):
|
||||
if self.env['runtime']['helpManager'].isTutorialMode():
|
||||
self.env['runtime']['inputManager'].keyEcho()
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,34 +1,34 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import time
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
self.lastTime = time.time()
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No description found'
|
||||
def run(self):
|
||||
playSound = False
|
||||
deviceList = self.env['runtime']['inputManager'].getLastDetectedDevices()
|
||||
try:
|
||||
for deviceEntry in deviceList:
|
||||
# dont play sounds for virtual devices
|
||||
playSound = playSound or not deviceEntry['virtual']
|
||||
except:
|
||||
playSound = True
|
||||
if playSound:
|
||||
if time.time() - self.lastTime > 5:
|
||||
self.env['runtime']['outputManager'].playSoundIcon(soundIcon = 'accept', interrupt=True)
|
||||
lastTime = time.time()
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import time
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
self.lastTime = time.time()
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No description found'
|
||||
def run(self):
|
||||
playSound = False
|
||||
deviceList = self.env['runtime']['inputManager'].getLastDetectedDevices()
|
||||
try:
|
||||
for deviceEntry in deviceList:
|
||||
# dont play sounds for virtual devices
|
||||
playSound = playSound or not deviceEntry['virtual']
|
||||
except:
|
||||
playSound = True
|
||||
if playSound:
|
||||
if time.time() - self.lastTime > 5:
|
||||
self.env['runtime']['outputManager'].playSoundIcon(soundIcon = 'accept', interrupt=True)
|
||||
lastTime = time.time()
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,23 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return ''
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['outputManager'].interruptOutput()
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return ''
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['outputManager'].interruptOutput()
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,27 +1,27 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('barrier','enabled'):
|
||||
return
|
||||
|
||||
self.env['runtime']['barrierManager'].handleLineBarrier(self.env['screen']['newContentText'].split('\n'), self.env['screen']['newCursor']['x'],self.env['screen']['newCursor']['y'])
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('barrier','enabled'):
|
||||
return
|
||||
|
||||
self.env['runtime']['barrierManager'].handleLineBarrier(self.env['screen']['newContentText'].split('\n'), self.env['screen']['newCursor']['x'],self.env['screen']['newCursor']['y'])
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,25 +1,25 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['outputManager'].presentText(_("screen {0}").format(self.env['screen']['newTTY']),soundIcon='ChangeTTY', interrupt=True, flush=False)
|
||||
self.env['runtime']['outputManager'].presentText(self.env['screen']['newContentText'], interrupt=False, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['outputManager'].presentText(_("screen {0}").format(self.env['screen']['newTTY']),soundIcon='ChangeTTY', interrupt=True, flush=False)
|
||||
self.env['runtime']['outputManager'].presentText(self.env['screen']['newContentText'], interrupt=False, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,23 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('enables or disables tracking of highlighted')
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'highlight'):
|
||||
return
|
||||
attributeDelta = self.env['runtime']['attributeManager'].getAttributeDelta()
|
||||
self.env['runtime']['outputManager'].presentText(attributeDelta, soundIcon='', interrupt=True, flush=False)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('enables or disables tracking of highlighted')
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'highlight'):
|
||||
return
|
||||
attributeDelta = self.env['runtime']['attributeManager'].getAttributeDelta()
|
||||
self.env['runtime']['outputManager'].presentText(attributeDelta, soundIcon='', interrupt=True, flush=False)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,67 +1,67 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return ''
|
||||
def run(self):
|
||||
if self.env['screen']['newAttribDelta'] != '':
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isScreenChange():
|
||||
return
|
||||
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
if self.env['runtime']['attributeManager'].isAttributeChange():
|
||||
return
|
||||
# hack for pdmenu and maybe other dialog apps that place the cursor at last cell/row
|
||||
# this is not to be identified as history
|
||||
if (self.env['screen']['newCursor']['x'] == self.env['runtime']['screenManager'].getColumns() - 1) and (self.env['screen']['newCursor']['y'] == self.env['runtime']['screenManager'].getRows() - 1):
|
||||
return
|
||||
if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']:
|
||||
if not (self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_UP'],['KEY_DOWN']]):
|
||||
return
|
||||
elif self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']:
|
||||
if not (self.env['runtime']['byteManager'].getLastByteKey() in [b'^[[A',b'^[[B']):
|
||||
return
|
||||
|
||||
prevLine = self.env['screen']['oldContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||
currLine = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||
if prevLine == currLine:
|
||||
if self.env['screen']['newDelta'] != '':
|
||||
return
|
||||
if not currLine.isspace():
|
||||
currPrompt = currLine.find('$')
|
||||
rootPrompt = currLine.find('#')
|
||||
if currPrompt <= 0:
|
||||
if rootPrompt > 0:
|
||||
currPrompt = rootPrompt
|
||||
else:
|
||||
announce = currLine
|
||||
if currPrompt > 0:
|
||||
remove_digits = str.maketrans('0123456789', ' ')
|
||||
if prevLine[:currPrompt].translate(remove_digits) == currLine[:currPrompt].translate(remove_digits):
|
||||
announce = currLine[currPrompt+1:]
|
||||
else:
|
||||
announce = currLine
|
||||
|
||||
if currLine.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(announce, interrupt=True, flush=False)
|
||||
self.env['commandsIgnore']['onScreenUpdate']['CHAR_DELETE_ECHO'] = True
|
||||
self.env['commandsIgnore']['onScreenUpdate']['CHAR_ECHO'] = True
|
||||
self.env['commandsIgnore']['onScreenUpdate']['INCOMING_IGNORE'] = True
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return ''
|
||||
def run(self):
|
||||
if self.env['screen']['newAttribDelta'] != '':
|
||||
return
|
||||
if self.env['runtime']['screenManager'].isScreenChange():
|
||||
return
|
||||
if self.env['runtime']['cursorManager'].isCursorVerticalMove():
|
||||
return
|
||||
if self.env['runtime']['attributeManager'].isAttributeChange():
|
||||
return
|
||||
# hack for pdmenu and maybe other dialog apps that place the cursor at last cell/row
|
||||
# this is not to be identified as history
|
||||
if (self.env['screen']['newCursor']['x'] == self.env['runtime']['screenManager'].getColumns() - 1) and (self.env['screen']['newCursor']['y'] == self.env['runtime']['screenManager'].getRows() - 1):
|
||||
return
|
||||
if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']:
|
||||
if not (self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_UP'],['KEY_DOWN']]):
|
||||
return
|
||||
elif self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']:
|
||||
if not (self.env['runtime']['byteManager'].getLastByteKey() in [b'^[[A',b'^[[B']):
|
||||
return
|
||||
|
||||
prevLine = self.env['screen']['oldContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||
currLine = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
|
||||
if prevLine == currLine:
|
||||
if self.env['screen']['newDelta'] != '':
|
||||
return
|
||||
if not currLine.isspace():
|
||||
currPrompt = currLine.find('$')
|
||||
rootPrompt = currLine.find('#')
|
||||
if currPrompt <= 0:
|
||||
if rootPrompt > 0:
|
||||
currPrompt = rootPrompt
|
||||
else:
|
||||
announce = currLine
|
||||
if currPrompt > 0:
|
||||
remove_digits = str.maketrans('0123456789', ' ')
|
||||
if prevLine[:currPrompt].translate(remove_digits) == currLine[:currPrompt].translate(remove_digits):
|
||||
announce = currLine[currPrompt+1:]
|
||||
else:
|
||||
announce = currLine
|
||||
|
||||
if currLine.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(_("blank"), soundIcon='EmptyLine', interrupt=True, flush=False)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(announce, interrupt=True, flush=False)
|
||||
self.env['commandsIgnore']['onScreenUpdate']['CHAR_DELETE_ECHO'] = True
|
||||
self.env['commandsIgnore']['onScreenUpdate']['CHAR_ECHO'] = True
|
||||
self.env['commandsIgnore']['onScreenUpdate']['INCOMING_IGNORE'] = True
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -1,39 +1,39 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'autoReadIncoming'):
|
||||
return
|
||||
# is there something to read?
|
||||
if not self.env['runtime']['screenManager'].isDelta(ignoreSpace=True):
|
||||
return
|
||||
|
||||
# this must be a keyecho or something
|
||||
#if len(self.env['screen']['newDelta'].strip(' \n\t')) <= 1:
|
||||
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
|
||||
yMove = abs(self.env['screen']['newCursor']['y'] - self.env['screen']['oldCursor']['y'])
|
||||
|
||||
if (xMove >= 1) and xMove == len(self.env['screen']['newDelta']):
|
||||
# if len(self.env['screen']['newDelta'].strip(' \n\t0123456789')) <= 2:
|
||||
if not '\n' in self.env['screen']['newDelta']:
|
||||
return
|
||||
#print(xMove, yMove, len(self.env['screen']['newDelta']), len(self.env['screen']['newNegativeDelta']))
|
||||
self.env['runtime']['outputManager'].presentText(self.env['screen']['newDelta'], interrupt=False, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'autoReadIncoming'):
|
||||
return
|
||||
# is there something to read?
|
||||
if not self.env['runtime']['screenManager'].isDelta(ignoreSpace=True):
|
||||
return
|
||||
|
||||
# this must be a keyecho or something
|
||||
#if len(self.env['screen']['newDelta'].strip(' \n\t')) <= 1:
|
||||
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
|
||||
yMove = abs(self.env['screen']['newCursor']['y'] - self.env['screen']['oldCursor']['y'])
|
||||
|
||||
if (xMove >= 1) and xMove == len(self.env['screen']['newDelta']):
|
||||
# if len(self.env['screen']['newDelta'].strip(' \n\t0123456789')) <= 2:
|
||||
if not '\n' in self.env['screen']['newDelta']:
|
||||
return
|
||||
#print(xMove, yMove, len(self.env['screen']['newDelta']), len(self.env['screen']['newNegativeDelta']))
|
||||
self.env['runtime']['outputManager'].presentText(self.env['screen']['newDelta'], interrupt=False, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -1,35 +1,35 @@
|
||||
#!/usr/bin/env python3
|
||||
import time
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('promote', 'enabled'):
|
||||
return
|
||||
if self.env['runtime']['settingsManager'].getSetting('promote', 'list').strip(" \t\n") == '':
|
||||
return
|
||||
if int(time.time() - self.env['input']['lastInputTime']) < self.env['runtime']['settingsManager'].getSettingAsInt('promote', 'inactiveTimeoutSec'):
|
||||
return
|
||||
if len(self.env['runtime']['settingsManager'].getSetting('promote', 'list')) == 0:
|
||||
return
|
||||
for promote in self.env['runtime']['settingsManager'].getSetting('promote', 'list').split(','):
|
||||
if promote in self.env['screen']['newDelta']:
|
||||
self.env['runtime']['outputManager'].playSoundIcon('PromotedText')
|
||||
self.env['input']['lastInputTime'] = time.time()
|
||||
return
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
#!/usr/bin/env python3
|
||||
import time
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return 'No Description found'
|
||||
def run(self):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('promote', 'enabled'):
|
||||
return
|
||||
if self.env['runtime']['settingsManager'].getSetting('promote', 'list').strip(" \t\n") == '':
|
||||
return
|
||||
if int(time.time() - self.env['input']['lastInputTime']) < self.env['runtime']['settingsManager'].getSettingAsInt('promote', 'inactiveTimeoutSec'):
|
||||
return
|
||||
if len(self.env['runtime']['settingsManager'].getSetting('promote', 'list')) == 0:
|
||||
return
|
||||
for promote in self.env['runtime']['settingsManager'].getSetting('promote', 'list').split(','):
|
||||
if promote in self.env['screen']['newDelta']:
|
||||
self.env['runtime']['outputManager'].playSoundIcon('PromotedText')
|
||||
self.env['input']['lastInputTime'] = time.time()
|
||||
return
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user