diff --git a/src/fenrir-package/commands/commands/bookmark_10.py b/src/fenrir-package/commands/commands/bookmark_10.py new file mode 100644 index 00000000..78458d15 --- /dev/null +++ b/src/fenrir-package/commands/commands/bookmark_10.py @@ -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 diff --git a/src/fenrir-package/commands/commands/bookmark_2.py b/src/fenrir-package/commands/commands/bookmark_2.py new file mode 100644 index 00000000..c104fbab --- /dev/null +++ b/src/fenrir-package/commands/commands/bookmark_2.py @@ -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 diff --git a/src/fenrir-package/commands/commands/bookmark_3.py b/src/fenrir-package/commands/commands/bookmark_3.py new file mode 100644 index 00000000..8ac7d219 --- /dev/null +++ b/src/fenrir-package/commands/commands/bookmark_3.py @@ -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 diff --git a/src/fenrir-package/commands/commands/bookmark_4.py b/src/fenrir-package/commands/commands/bookmark_4.py new file mode 100644 index 00000000..632078a1 --- /dev/null +++ b/src/fenrir-package/commands/commands/bookmark_4.py @@ -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 diff --git a/src/fenrir-package/commands/commands/bookmark_5.py b/src/fenrir-package/commands/commands/bookmark_5.py new file mode 100644 index 00000000..a6f0dbb4 --- /dev/null +++ b/src/fenrir-package/commands/commands/bookmark_5.py @@ -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 diff --git a/src/fenrir-package/commands/commands/bookmark_6.py b/src/fenrir-package/commands/commands/bookmark_6.py new file mode 100644 index 00000000..b3af4f1d --- /dev/null +++ b/src/fenrir-package/commands/commands/bookmark_6.py @@ -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 diff --git a/src/fenrir-package/commands/commands/bookmark_7.py b/src/fenrir-package/commands/commands/bookmark_7.py new file mode 100644 index 00000000..ead50f79 --- /dev/null +++ b/src/fenrir-package/commands/commands/bookmark_7.py @@ -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 diff --git a/src/fenrir-package/commands/commands/bookmark_8.py b/src/fenrir-package/commands/commands/bookmark_8.py new file mode 100644 index 00000000..0e3546d1 --- /dev/null +++ b/src/fenrir-package/commands/commands/bookmark_8.py @@ -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 diff --git a/src/fenrir-package/commands/commands/bookmark_9.py b/src/fenrir-package/commands/commands/bookmark_9.py new file mode 100644 index 00000000..41f70c84 --- /dev/null +++ b/src/fenrir-package/commands/commands/bookmark_9.py @@ -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 diff --git a/src/fenrir-package/commands/commands/clear_bookmark_10.py b/src/fenrir-package/commands/commands/clear_bookmark_10.py new file mode 100644 index 00000000..335a73b9 --- /dev/null +++ b/src/fenrir-package/commands/commands/clear_bookmark_10.py @@ -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 diff --git a/src/fenrir-package/commands/commands/clear_bookmark_2.py b/src/fenrir-package/commands/commands/clear_bookmark_2.py new file mode 100644 index 00000000..3f6f7139 --- /dev/null +++ b/src/fenrir-package/commands/commands/clear_bookmark_2.py @@ -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 diff --git a/src/fenrir-package/commands/commands/clear_bookmark_3.py b/src/fenrir-package/commands/commands/clear_bookmark_3.py new file mode 100644 index 00000000..22471fa8 --- /dev/null +++ b/src/fenrir-package/commands/commands/clear_bookmark_3.py @@ -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 diff --git a/src/fenrir-package/commands/commands/clear_bookmark_4.py b/src/fenrir-package/commands/commands/clear_bookmark_4.py new file mode 100644 index 00000000..3d440a3b --- /dev/null +++ b/src/fenrir-package/commands/commands/clear_bookmark_4.py @@ -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 diff --git a/src/fenrir-package/commands/commands/clear_bookmark_5.py b/src/fenrir-package/commands/commands/clear_bookmark_5.py new file mode 100644 index 00000000..17d275bd --- /dev/null +++ b/src/fenrir-package/commands/commands/clear_bookmark_5.py @@ -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 diff --git a/src/fenrir-package/commands/commands/clear_bookmark_6.py b/src/fenrir-package/commands/commands/clear_bookmark_6.py new file mode 100644 index 00000000..d7906f01 --- /dev/null +++ b/src/fenrir-package/commands/commands/clear_bookmark_6.py @@ -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 diff --git a/src/fenrir-package/commands/commands/clear_bookmark_7.py b/src/fenrir-package/commands/commands/clear_bookmark_7.py new file mode 100644 index 00000000..3a46a111 --- /dev/null +++ b/src/fenrir-package/commands/commands/clear_bookmark_7.py @@ -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 diff --git a/src/fenrir-package/commands/commands/clear_bookmark_8.py b/src/fenrir-package/commands/commands/clear_bookmark_8.py new file mode 100644 index 00000000..f9ce2a31 --- /dev/null +++ b/src/fenrir-package/commands/commands/clear_bookmark_8.py @@ -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 diff --git a/src/fenrir-package/commands/commands/clear_bookmark_9.py b/src/fenrir-package/commands/commands/clear_bookmark_9.py new file mode 100644 index 00000000..79e47f39 --- /dev/null +++ b/src/fenrir-package/commands/commands/clear_bookmark_9.py @@ -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 diff --git a/src/fenrir-package/commands/commands/set_bookmark_10.py b/src/fenrir-package/commands/commands/set_bookmark_10.py new file mode 100644 index 00000000..1e51729a --- /dev/null +++ b/src/fenrir-package/commands/commands/set_bookmark_10.py @@ -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 diff --git a/src/fenrir-package/commands/commands/set_bookmark_2.py b/src/fenrir-package/commands/commands/set_bookmark_2.py new file mode 100644 index 00000000..8087700e --- /dev/null +++ b/src/fenrir-package/commands/commands/set_bookmark_2.py @@ -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 diff --git a/src/fenrir-package/commands/commands/set_bookmark_3.py b/src/fenrir-package/commands/commands/set_bookmark_3.py new file mode 100644 index 00000000..ee00d310 --- /dev/null +++ b/src/fenrir-package/commands/commands/set_bookmark_3.py @@ -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 diff --git a/src/fenrir-package/commands/commands/set_bookmark_4.py b/src/fenrir-package/commands/commands/set_bookmark_4.py new file mode 100644 index 00000000..b983b418 --- /dev/null +++ b/src/fenrir-package/commands/commands/set_bookmark_4.py @@ -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 diff --git a/src/fenrir-package/commands/commands/set_bookmark_5.py b/src/fenrir-package/commands/commands/set_bookmark_5.py new file mode 100644 index 00000000..10dbb868 --- /dev/null +++ b/src/fenrir-package/commands/commands/set_bookmark_5.py @@ -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 diff --git a/src/fenrir-package/commands/commands/set_bookmark_6.py b/src/fenrir-package/commands/commands/set_bookmark_6.py new file mode 100644 index 00000000..43979791 --- /dev/null +++ b/src/fenrir-package/commands/commands/set_bookmark_6.py @@ -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 diff --git a/src/fenrir-package/commands/commands/set_bookmark_7.py b/src/fenrir-package/commands/commands/set_bookmark_7.py new file mode 100644 index 00000000..6fbbcbbc --- /dev/null +++ b/src/fenrir-package/commands/commands/set_bookmark_7.py @@ -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 diff --git a/src/fenrir-package/commands/commands/set_bookmark_8.py b/src/fenrir-package/commands/commands/set_bookmark_8.py new file mode 100644 index 00000000..dd87c7f4 --- /dev/null +++ b/src/fenrir-package/commands/commands/set_bookmark_8.py @@ -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 diff --git a/src/fenrir-package/commands/commands/set_bookmark_9.py b/src/fenrir-package/commands/commands/set_bookmark_9.py new file mode 100644 index 00000000..5136e375 --- /dev/null +++ b/src/fenrir-package/commands/commands/set_bookmark_9.py @@ -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