some more work in structure
This commit is contained in:
parent
39684dea75
commit
8285ccaaed
@ -0,0 +1,30 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import datetime
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('presents the date')
|
||||
|
||||
def run(self):
|
||||
dateFormat = self.env['runtime']['settingsManager'].getSetting('general', 'dateFormat')
|
||||
|
||||
# get the time formatted
|
||||
dateString = datetime.datetime.strftime(datetime.datetime.now(), dateFormat)
|
||||
|
||||
# present the time via speak and braile, there is no soundicon, interrupt the current speech
|
||||
self.env['runtime']['outputManager'].presentText(dateString , soundIcon='', interrupt=True)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
@ -0,0 +1,22 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('get current help message')
|
||||
def run(self):
|
||||
text = self.env['runtime']['helpManager'].getHelpForCurrentIndex()
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
@ -0,0 +1,23 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('get prev help message')
|
||||
def run(self):
|
||||
self.env['runtime']['helpManager'].prevIndex()
|
||||
text = self.env['runtime']['helpManager'].getHelpForCurrentIndex()
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
@ -0,0 +1,23 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('get prev help message')
|
||||
def run(self):
|
||||
self.env['runtime']['helpManager'].prevIndex()
|
||||
text = self.env['runtime']['helpManager'].getHelpForCurrentIndex()
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
@ -0,0 +1,23 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('get prev help message')
|
||||
def run(self):
|
||||
self.env['runtime']['helpManager'].prevIndex()
|
||||
text = self.env['runtime']['helpManager'].getHelpForCurrentIndex()
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
@ -0,0 +1,23 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('get next help message')
|
||||
def run(self):
|
||||
self.env['runtime']['helpManager'].nextIndex()
|
||||
text = self.env['runtime']['helpManager'].getHelpForCurrentIndex()
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
@ -0,0 +1,23 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('get prev help message')
|
||||
def run(self):
|
||||
self.env['runtime']['helpManager'].prevIndex()
|
||||
text = self.env['runtime']['helpManager'].getHelpForCurrentIndex()
|
||||
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
|
||||
def setCallback(self, callback):
|
||||
pass
|
@ -5,6 +5,7 @@
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
import os
|
||||
|
||||
|
||||
class vmenuManager():
|
||||
@ -62,4 +63,26 @@ class vmenuManager():
|
||||
return
|
||||
self.currIndex -= 1
|
||||
if self.currIndex < 0:
|
||||
self.currIndex = len(self.menuDict) - 1
|
||||
self.currIndex = len(self.menuDict) - 1
|
||||
def fs_tree_to_dict(self, path_):
|
||||
for root, dirs, files in os.walk(path_):
|
||||
tree = {d: fs_tree_to_dict(os.path.join(root, d)) for d in dirs}
|
||||
tree.update({f: root + f for f in files})
|
||||
return tree # note we discontinue iteration trough os.walk
|
||||
''''
|
||||
import os
|
||||
level = [0]
|
||||
|
||||
def fs_tree_to_dict( path_):
|
||||
file_token = ''
|
||||
for root, dirs, files in os.walk(path_):
|
||||
tree = {d: fs_tree_to_dict(os.path.join(root, d)) for d in dirs}
|
||||
print(files, root, dirs)
|
||||
tree.update({f: root + f for f in files})
|
||||
return tree # note we discontinue iteration trough os.walk
|
||||
|
||||
v = fs_tree_to_dict( '/home/chrys/Projekte/fenrir/src/fenrirscreenreader/commands/vmenu')
|
||||
|
||||
|
||||
|
||||
''''
|
||||
|
Loading…
Reference in New Issue
Block a user