Changed time format slightly, added dte command, added fenrir+d command for date.

This commit is contained in:
Storm Dragon
2016-08-28 13:24:15 -04:00
parent 49aebcec80
commit 1263ce2709
9 changed files with 39 additions and 94 deletions

View File

@ -0,0 +1,28 @@
#!/bin/python
import datetime
class command():
def __init__(self):
pass
def run(self, environment):
#this is the way to load the settings:
# general is the section in the config file, timeFormat is the variable
# this has to been added to settings.conf in sectino [general]
# dateFormat="%A, %B %d, %Y"
# the following has to been added to core/settings.py to the key 'general'
# the settings.py is used for default values
# dateFormat="%A, %B %d, %Y"
dateFormat = environment['runtime']['settingsManager'].getSetting(environment,'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
environment['runtime']['outputManager'].presentText(environment, dateString , soundIcon='', interrupt=True)
return environment
def setCallback(self, callback):
pass
def shutdown(self):
pass

View File

@ -9,10 +9,10 @@ class command():
#this is the way to load the settings:
# general is the section in the config file, timeFormat is the variable
# this has to been added to settings.conf in sectino [general]
# timeFormat=%H:%M;%P
# timeFormat=%I:%M%P
# the following has to been added to core/settings.py to the key 'general'
# the settings.py is used for default values
# 'timeFormat':"%H:%M;%P",
# 'timeFormat':"%I:%M%P",
timeFormat = environment['runtime']['settingsManager'].getSetting(environment,'general', 'timeFormat')
# get the time formatted

View File

@ -35,7 +35,8 @@ settings = {
'punctuationLevel': 1,
'numberOfClipboards': 10,
'fenrirKeys':['82'],
'timeFormat':'%H:%M:%P',
'timeFormat':'%I:%M%P',
'dateFormat':'%A, %B %d, %Y',
},
'promote':{
'enabled': True,