Merge branch 'master' of github.com:chrys87/fenrir
This commit is contained in:
commit
d63b21a50f
48
src/fenrir-package/commands/commands/bookmark_10.py
Normal file
48
src/fenrir-package/commands/commands/bookmark_10.py
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
from utils import mark_utils
|
||||||
|
from utils import line_utils
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '10'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'read Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID]:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark " + self.ID + "not set", interrupt=True)
|
||||||
|
return
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||||
|
return
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||||
|
return
|
||||||
|
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
|
||||||
|
# set marks
|
||||||
|
marked = ''
|
||||||
|
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()
|
||||||
|
if self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2']:
|
||||||
|
endMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'].copy()
|
||||||
|
marked = mark_utils.getTextBetweenMarks(startMark, endMark, self.env['screenData']['newContentText'])
|
||||||
|
else:
|
||||||
|
x, y, marked = \
|
||||||
|
line_utils.getCurrentLine(startMark['x'], startMark['y'], self.env['screenData']['newContentText'])
|
||||||
|
if marked.strip(" \t\n") == '':
|
||||||
|
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True)
|
||||||
|
else:
|
||||||
|
self.env['runtime']['outputManager'].presentText(marked, interrupt=True)
|
||||||
|
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
48
src/fenrir-package/commands/commands/bookmark_2.py
Normal file
48
src/fenrir-package/commands/commands/bookmark_2.py
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
from utils import mark_utils
|
||||||
|
from utils import line_utils
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '2'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'read Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID]:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark " + self.ID + "not set", interrupt=True)
|
||||||
|
return
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||||
|
return
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||||
|
return
|
||||||
|
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
|
||||||
|
# set marks
|
||||||
|
marked = ''
|
||||||
|
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()
|
||||||
|
if self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2']:
|
||||||
|
endMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'].copy()
|
||||||
|
marked = mark_utils.getTextBetweenMarks(startMark, endMark, self.env['screenData']['newContentText'])
|
||||||
|
else:
|
||||||
|
x, y, marked = \
|
||||||
|
line_utils.getCurrentLine(startMark['x'], startMark['y'], self.env['screenData']['newContentText'])
|
||||||
|
if marked.strip(" \t\n") == '':
|
||||||
|
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True)
|
||||||
|
else:
|
||||||
|
self.env['runtime']['outputManager'].presentText(marked, interrupt=True)
|
||||||
|
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
48
src/fenrir-package/commands/commands/bookmark_3.py
Normal file
48
src/fenrir-package/commands/commands/bookmark_3.py
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
from utils import mark_utils
|
||||||
|
from utils import line_utils
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '3'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'read Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID]:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark " + self.ID + "not set", interrupt=True)
|
||||||
|
return
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||||
|
return
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||||
|
return
|
||||||
|
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
|
||||||
|
# set marks
|
||||||
|
marked = ''
|
||||||
|
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()
|
||||||
|
if self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2']:
|
||||||
|
endMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'].copy()
|
||||||
|
marked = mark_utils.getTextBetweenMarks(startMark, endMark, self.env['screenData']['newContentText'])
|
||||||
|
else:
|
||||||
|
x, y, marked = \
|
||||||
|
line_utils.getCurrentLine(startMark['x'], startMark['y'], self.env['screenData']['newContentText'])
|
||||||
|
if marked.strip(" \t\n") == '':
|
||||||
|
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True)
|
||||||
|
else:
|
||||||
|
self.env['runtime']['outputManager'].presentText(marked, interrupt=True)
|
||||||
|
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
48
src/fenrir-package/commands/commands/bookmark_4.py
Normal file
48
src/fenrir-package/commands/commands/bookmark_4.py
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
from utils import mark_utils
|
||||||
|
from utils import line_utils
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '4'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'read Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID]:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark " + self.ID + "not set", interrupt=True)
|
||||||
|
return
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||||
|
return
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||||
|
return
|
||||||
|
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
|
||||||
|
# set marks
|
||||||
|
marked = ''
|
||||||
|
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()
|
||||||
|
if self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2']:
|
||||||
|
endMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'].copy()
|
||||||
|
marked = mark_utils.getTextBetweenMarks(startMark, endMark, self.env['screenData']['newContentText'])
|
||||||
|
else:
|
||||||
|
x, y, marked = \
|
||||||
|
line_utils.getCurrentLine(startMark['x'], startMark['y'], self.env['screenData']['newContentText'])
|
||||||
|
if marked.strip(" \t\n") == '':
|
||||||
|
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True)
|
||||||
|
else:
|
||||||
|
self.env['runtime']['outputManager'].presentText(marked, interrupt=True)
|
||||||
|
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
48
src/fenrir-package/commands/commands/bookmark_5.py
Normal file
48
src/fenrir-package/commands/commands/bookmark_5.py
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
from utils import mark_utils
|
||||||
|
from utils import line_utils
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '5'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'read Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID]:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark " + self.ID + "not set", interrupt=True)
|
||||||
|
return
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||||
|
return
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||||
|
return
|
||||||
|
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
|
||||||
|
# set marks
|
||||||
|
marked = ''
|
||||||
|
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()
|
||||||
|
if self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2']:
|
||||||
|
endMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'].copy()
|
||||||
|
marked = mark_utils.getTextBetweenMarks(startMark, endMark, self.env['screenData']['newContentText'])
|
||||||
|
else:
|
||||||
|
x, y, marked = \
|
||||||
|
line_utils.getCurrentLine(startMark['x'], startMark['y'], self.env['screenData']['newContentText'])
|
||||||
|
if marked.strip(" \t\n") == '':
|
||||||
|
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True)
|
||||||
|
else:
|
||||||
|
self.env['runtime']['outputManager'].presentText(marked, interrupt=True)
|
||||||
|
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
48
src/fenrir-package/commands/commands/bookmark_6.py
Normal file
48
src/fenrir-package/commands/commands/bookmark_6.py
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
from utils import mark_utils
|
||||||
|
from utils import line_utils
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '6'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'read Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID]:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark " + self.ID + "not set", interrupt=True)
|
||||||
|
return
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||||
|
return
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||||
|
return
|
||||||
|
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
|
||||||
|
# set marks
|
||||||
|
marked = ''
|
||||||
|
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()
|
||||||
|
if self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2']:
|
||||||
|
endMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'].copy()
|
||||||
|
marked = mark_utils.getTextBetweenMarks(startMark, endMark, self.env['screenData']['newContentText'])
|
||||||
|
else:
|
||||||
|
x, y, marked = \
|
||||||
|
line_utils.getCurrentLine(startMark['x'], startMark['y'], self.env['screenData']['newContentText'])
|
||||||
|
if marked.strip(" \t\n") == '':
|
||||||
|
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True)
|
||||||
|
else:
|
||||||
|
self.env['runtime']['outputManager'].presentText(marked, interrupt=True)
|
||||||
|
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
48
src/fenrir-package/commands/commands/bookmark_7.py
Normal file
48
src/fenrir-package/commands/commands/bookmark_7.py
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
from utils import mark_utils
|
||||||
|
from utils import line_utils
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '7'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'read Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID]:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark " + self.ID + "not set", interrupt=True)
|
||||||
|
return
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||||
|
return
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||||
|
return
|
||||||
|
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
|
||||||
|
# set marks
|
||||||
|
marked = ''
|
||||||
|
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()
|
||||||
|
if self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2']:
|
||||||
|
endMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'].copy()
|
||||||
|
marked = mark_utils.getTextBetweenMarks(startMark, endMark, self.env['screenData']['newContentText'])
|
||||||
|
else:
|
||||||
|
x, y, marked = \
|
||||||
|
line_utils.getCurrentLine(startMark['x'], startMark['y'], self.env['screenData']['newContentText'])
|
||||||
|
if marked.strip(" \t\n") == '':
|
||||||
|
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True)
|
||||||
|
else:
|
||||||
|
self.env['runtime']['outputManager'].presentText(marked, interrupt=True)
|
||||||
|
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
48
src/fenrir-package/commands/commands/bookmark_8.py
Normal file
48
src/fenrir-package/commands/commands/bookmark_8.py
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
from utils import mark_utils
|
||||||
|
from utils import line_utils
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '8'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'read Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID]:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark " + self.ID + "not set", interrupt=True)
|
||||||
|
return
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||||
|
return
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||||
|
return
|
||||||
|
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
|
||||||
|
# set marks
|
||||||
|
marked = ''
|
||||||
|
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()
|
||||||
|
if self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2']:
|
||||||
|
endMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'].copy()
|
||||||
|
marked = mark_utils.getTextBetweenMarks(startMark, endMark, self.env['screenData']['newContentText'])
|
||||||
|
else:
|
||||||
|
x, y, marked = \
|
||||||
|
line_utils.getCurrentLine(startMark['x'], startMark['y'], self.env['screenData']['newContentText'])
|
||||||
|
if marked.strip(" \t\n") == '':
|
||||||
|
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True)
|
||||||
|
else:
|
||||||
|
self.env['runtime']['outputManager'].presentText(marked, interrupt=True)
|
||||||
|
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
48
src/fenrir-package/commands/commands/bookmark_9.py
Normal file
48
src/fenrir-package/commands/commands/bookmark_9.py
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
from utils import mark_utils
|
||||||
|
from utils import line_utils
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '9'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'read Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID]:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark " + self.ID + "not set", interrupt=True)
|
||||||
|
return
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||||
|
return
|
||||||
|
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
|
||||||
|
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
|
||||||
|
return
|
||||||
|
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
|
||||||
|
# set marks
|
||||||
|
marked = ''
|
||||||
|
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()
|
||||||
|
if self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2']:
|
||||||
|
endMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'].copy()
|
||||||
|
marked = mark_utils.getTextBetweenMarks(startMark, endMark, self.env['screenData']['newContentText'])
|
||||||
|
else:
|
||||||
|
x, y, marked = \
|
||||||
|
line_utils.getCurrentLine(startMark['x'], startMark['y'], self.env['screenData']['newContentText'])
|
||||||
|
if marked.strip(" \t\n") == '':
|
||||||
|
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True)
|
||||||
|
else:
|
||||||
|
self.env['runtime']['outputManager'].presentText(marked, interrupt=True)
|
||||||
|
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
27
src/fenrir-package/commands/commands/clear_bookmark_10.py
Normal file
27
src/fenrir-package/commands/commands/clear_bookmark_10.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '10'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'remove Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
|
||||||
|
del self.env['commandBuffer']['bookMarks'][self.ID][currApp]
|
||||||
|
|
||||||
|
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " removed for application " + currApp, interrupt=True)
|
||||||
|
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
27
src/fenrir-package/commands/commands/clear_bookmark_2.py
Normal file
27
src/fenrir-package/commands/commands/clear_bookmark_2.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '2'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'remove Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
|
||||||
|
del self.env['commandBuffer']['bookMarks'][self.ID][currApp]
|
||||||
|
|
||||||
|
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " removed for application " + currApp, interrupt=True)
|
||||||
|
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
27
src/fenrir-package/commands/commands/clear_bookmark_3.py
Normal file
27
src/fenrir-package/commands/commands/clear_bookmark_3.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '3'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'remove Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
|
||||||
|
del self.env['commandBuffer']['bookMarks'][self.ID][currApp]
|
||||||
|
|
||||||
|
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " removed for application " + currApp, interrupt=True)
|
||||||
|
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
27
src/fenrir-package/commands/commands/clear_bookmark_4.py
Normal file
27
src/fenrir-package/commands/commands/clear_bookmark_4.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '4'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'remove Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
|
||||||
|
del self.env['commandBuffer']['bookMarks'][self.ID][currApp]
|
||||||
|
|
||||||
|
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " removed for application " + currApp, interrupt=True)
|
||||||
|
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
27
src/fenrir-package/commands/commands/clear_bookmark_5.py
Normal file
27
src/fenrir-package/commands/commands/clear_bookmark_5.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '5'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'remove Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
|
||||||
|
del self.env['commandBuffer']['bookMarks'][self.ID][currApp]
|
||||||
|
|
||||||
|
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " removed for application " + currApp, interrupt=True)
|
||||||
|
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
27
src/fenrir-package/commands/commands/clear_bookmark_6.py
Normal file
27
src/fenrir-package/commands/commands/clear_bookmark_6.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '6'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'remove Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
|
||||||
|
del self.env['commandBuffer']['bookMarks'][self.ID][currApp]
|
||||||
|
|
||||||
|
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " removed for application " + currApp, interrupt=True)
|
||||||
|
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
27
src/fenrir-package/commands/commands/clear_bookmark_7.py
Normal file
27
src/fenrir-package/commands/commands/clear_bookmark_7.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '7'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'remove Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
|
||||||
|
del self.env['commandBuffer']['bookMarks'][self.ID][currApp]
|
||||||
|
|
||||||
|
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " removed for application " + currApp, interrupt=True)
|
||||||
|
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
27
src/fenrir-package/commands/commands/clear_bookmark_8.py
Normal file
27
src/fenrir-package/commands/commands/clear_bookmark_8.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '8'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'remove Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
|
||||||
|
del self.env['commandBuffer']['bookMarks'][self.ID][currApp]
|
||||||
|
|
||||||
|
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " removed for application " + currApp, interrupt=True)
|
||||||
|
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
27
src/fenrir-package/commands/commands/clear_bookmark_9.py
Normal file
27
src/fenrir-package/commands/commands/clear_bookmark_9.py
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '9'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'remove Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
|
||||||
|
del self.env['commandBuffer']['bookMarks'][self.ID][currApp]
|
||||||
|
|
||||||
|
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " removed for application " + currApp, interrupt=True)
|
||||||
|
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
@ -27,7 +27,7 @@ class command():
|
|||||||
self.env['runtime']['outputManager'].presentText("blank" ,interrupt=True)
|
self.env['runtime']['outputManager'].presentText("blank" ,interrupt=True)
|
||||||
else:
|
else:
|
||||||
self.env['runtime']['outputManager'].presentText(currChar ,interrupt=True, ignorePunctuation=True, announceCapital=True)
|
self.env['runtime']['outputManager'].presentText(currChar ,interrupt=True, ignorePunctuation=True, announceCapital=True)
|
||||||
self.env['runtime']['outputManager'].presentText("begin of line", interrupt=False)
|
self.env['runtime']['outputManager'].presentText("beginning of line", interrupt=False)
|
||||||
|
|
||||||
def setCallback(self, callback):
|
def setCallback(self, callback):
|
||||||
pass
|
pass
|
||||||
|
36
src/fenrir-package/commands/commands/set_bookmark_10.py
Normal file
36
src/fenrir-package/commands/commands/set_bookmark_10.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '10'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID] = {}
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'set Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
if not self.env['commandBuffer']['Marks']['1']:
|
||||||
|
self.env['runtime']['outputManager'].presentText("No Mark found", interrupt=True)
|
||||||
|
return
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp] = {}
|
||||||
|
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'] = self.env['commandBuffer']['Marks']['1'].copy()
|
||||||
|
if self.env['commandBuffer']['Marks']['2']:
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = self.env['commandBuffer']['Marks']['2'].copy()
|
||||||
|
else:
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = None
|
||||||
|
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " set for application " + currApp, interrupt=True)
|
||||||
|
self.env['commandBuffer']['Marks']['1'] = None
|
||||||
|
self.env['commandBuffer']['Marks']['2'] = None
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
36
src/fenrir-package/commands/commands/set_bookmark_2.py
Normal file
36
src/fenrir-package/commands/commands/set_bookmark_2.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '2'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID] = {}
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'set Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
if not self.env['commandBuffer']['Marks']['1']:
|
||||||
|
self.env['runtime']['outputManager'].presentText("No Mark found", interrupt=True)
|
||||||
|
return
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp] = {}
|
||||||
|
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'] = self.env['commandBuffer']['Marks']['1'].copy()
|
||||||
|
if self.env['commandBuffer']['Marks']['2']:
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = self.env['commandBuffer']['Marks']['2'].copy()
|
||||||
|
else:
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = None
|
||||||
|
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " set for application " + currApp, interrupt=True)
|
||||||
|
self.env['commandBuffer']['Marks']['1'] = None
|
||||||
|
self.env['commandBuffer']['Marks']['2'] = None
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
36
src/fenrir-package/commands/commands/set_bookmark_3.py
Normal file
36
src/fenrir-package/commands/commands/set_bookmark_3.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '3'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID] = {}
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'set Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
if not self.env['commandBuffer']['Marks']['1']:
|
||||||
|
self.env['runtime']['outputManager'].presentText("No Mark found", interrupt=True)
|
||||||
|
return
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp] = {}
|
||||||
|
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'] = self.env['commandBuffer']['Marks']['1'].copy()
|
||||||
|
if self.env['commandBuffer']['Marks']['2']:
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = self.env['commandBuffer']['Marks']['2'].copy()
|
||||||
|
else:
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = None
|
||||||
|
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " set for application " + currApp, interrupt=True)
|
||||||
|
self.env['commandBuffer']['Marks']['1'] = None
|
||||||
|
self.env['commandBuffer']['Marks']['2'] = None
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
36
src/fenrir-package/commands/commands/set_bookmark_4.py
Normal file
36
src/fenrir-package/commands/commands/set_bookmark_4.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '4'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID] = {}
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'set Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
if not self.env['commandBuffer']['Marks']['1']:
|
||||||
|
self.env['runtime']['outputManager'].presentText("No Mark found", interrupt=True)
|
||||||
|
return
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp] = {}
|
||||||
|
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'] = self.env['commandBuffer']['Marks']['1'].copy()
|
||||||
|
if self.env['commandBuffer']['Marks']['2']:
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = self.env['commandBuffer']['Marks']['2'].copy()
|
||||||
|
else:
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = None
|
||||||
|
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " set for application " + currApp, interrupt=True)
|
||||||
|
self.env['commandBuffer']['Marks']['1'] = None
|
||||||
|
self.env['commandBuffer']['Marks']['2'] = None
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
36
src/fenrir-package/commands/commands/set_bookmark_5.py
Normal file
36
src/fenrir-package/commands/commands/set_bookmark_5.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '5'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID] = {}
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'set Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
if not self.env['commandBuffer']['Marks']['1']:
|
||||||
|
self.env['runtime']['outputManager'].presentText("No Mark found", interrupt=True)
|
||||||
|
return
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp] = {}
|
||||||
|
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'] = self.env['commandBuffer']['Marks']['1'].copy()
|
||||||
|
if self.env['commandBuffer']['Marks']['2']:
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = self.env['commandBuffer']['Marks']['2'].copy()
|
||||||
|
else:
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = None
|
||||||
|
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " set for application " + currApp, interrupt=True)
|
||||||
|
self.env['commandBuffer']['Marks']['1'] = None
|
||||||
|
self.env['commandBuffer']['Marks']['2'] = None
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
36
src/fenrir-package/commands/commands/set_bookmark_6.py
Normal file
36
src/fenrir-package/commands/commands/set_bookmark_6.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '6'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID] = {}
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'set Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
if not self.env['commandBuffer']['Marks']['1']:
|
||||||
|
self.env['runtime']['outputManager'].presentText("No Mark found", interrupt=True)
|
||||||
|
return
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp] = {}
|
||||||
|
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'] = self.env['commandBuffer']['Marks']['1'].copy()
|
||||||
|
if self.env['commandBuffer']['Marks']['2']:
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = self.env['commandBuffer']['Marks']['2'].copy()
|
||||||
|
else:
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = None
|
||||||
|
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " set for application " + currApp, interrupt=True)
|
||||||
|
self.env['commandBuffer']['Marks']['1'] = None
|
||||||
|
self.env['commandBuffer']['Marks']['2'] = None
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
36
src/fenrir-package/commands/commands/set_bookmark_7.py
Normal file
36
src/fenrir-package/commands/commands/set_bookmark_7.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '7'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID] = {}
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'set Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
if not self.env['commandBuffer']['Marks']['1']:
|
||||||
|
self.env['runtime']['outputManager'].presentText("No Mark found", interrupt=True)
|
||||||
|
return
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp] = {}
|
||||||
|
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'] = self.env['commandBuffer']['Marks']['1'].copy()
|
||||||
|
if self.env['commandBuffer']['Marks']['2']:
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = self.env['commandBuffer']['Marks']['2'].copy()
|
||||||
|
else:
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = None
|
||||||
|
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " set for application " + currApp, interrupt=True)
|
||||||
|
self.env['commandBuffer']['Marks']['1'] = None
|
||||||
|
self.env['commandBuffer']['Marks']['2'] = None
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
36
src/fenrir-package/commands/commands/set_bookmark_8.py
Normal file
36
src/fenrir-package/commands/commands/set_bookmark_8.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '8'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID] = {}
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'set Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
if not self.env['commandBuffer']['Marks']['1']:
|
||||||
|
self.env['runtime']['outputManager'].presentText("No Mark found", interrupt=True)
|
||||||
|
return
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp] = {}
|
||||||
|
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'] = self.env['commandBuffer']['Marks']['1'].copy()
|
||||||
|
if self.env['commandBuffer']['Marks']['2']:
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = self.env['commandBuffer']['Marks']['2'].copy()
|
||||||
|
else:
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = None
|
||||||
|
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " set for application " + currApp, interrupt=True)
|
||||||
|
self.env['commandBuffer']['Marks']['1'] = None
|
||||||
|
self.env['commandBuffer']['Marks']['2'] = None
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
36
src/fenrir-package/commands/commands/set_bookmark_9.py
Normal file
36
src/fenrir-package/commands/commands/set_bookmark_9.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
|
||||||
|
class command():
|
||||||
|
def __init__(self):
|
||||||
|
self.ID = '9'
|
||||||
|
def initialize(self, environment):
|
||||||
|
self.env = environment
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID] = {}
|
||||||
|
def shutdown(self):
|
||||||
|
pass
|
||||||
|
def getDescription(self):
|
||||||
|
return 'set Bookmark ' + self.ID
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
if not self.env['commandBuffer']['Marks']['1']:
|
||||||
|
self.env['runtime']['outputManager'].presentText("No Mark found", interrupt=True)
|
||||||
|
return
|
||||||
|
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp] = {}
|
||||||
|
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'] = self.env['commandBuffer']['Marks']['1'].copy()
|
||||||
|
if self.env['commandBuffer']['Marks']['2']:
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = self.env['commandBuffer']['Marks']['2'].copy()
|
||||||
|
else:
|
||||||
|
self.env['commandBuffer']['bookMarks'][self.ID][currApp]['2'] = None
|
||||||
|
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " set for application " + currApp, interrupt=True)
|
||||||
|
self.env['commandBuffer']['Marks']['1'] = None
|
||||||
|
self.env['commandBuffer']['Marks']['2'] = None
|
||||||
|
def setCallback(self, callback):
|
||||||
|
pass
|
@ -22,7 +22,7 @@ class punctuationManager():
|
|||||||
self.punctuation = {
|
self.punctuation = {
|
||||||
'levels':{
|
'levels':{
|
||||||
'NONE': '',
|
'NONE': '',
|
||||||
'SOME': '.-$~+*-/\\@',
|
'SOME': '#-$~+*-/\\@',
|
||||||
'MOST': '.,:-$~+*-/\\@!#%^&*()[]}{<>;',
|
'MOST': '.,:-$~+*-/\\@!#%^&*()[]}{<>;',
|
||||||
'ALL': string.punctuation,
|
'ALL': string.punctuation,
|
||||||
},
|
},
|
||||||
@ -61,9 +61,10 @@ class punctuationManager():
|
|||||||
'=':'equals',
|
'=':'equals',
|
||||||
},
|
},
|
||||||
'customDict':{
|
'customDict':{
|
||||||
':)':'smile',
|
':)':'smiley',
|
||||||
';)':'twinker',
|
';)':'winking face',
|
||||||
'XD':'loool',
|
'XD':'loool',
|
||||||
|
':@':'angry face',
|
||||||
':D':'lought'
|
':D':'lought'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user