finish up time example

This commit is contained in:
chrys 2016-08-26 01:42:31 +02:00
parent 5e08b9aff5
commit cbb41f8570
10 changed files with 64 additions and 3 deletions

View File

@ -20,6 +20,7 @@
#=toggle_output
#=toggle_autoRead
#=quit_fenrir
#=time
#=foreward_keypress
#=inc_speech_volume
#=dec_speech_volume

View File

@ -20,6 +20,7 @@
#=toggle_output
#=toggle_autoRead
#=quit_fenrir
#=time
#=foreward_keypress
#=inc_speech_volume
#=dec_speech_volume

View File

@ -20,6 +20,7 @@
#=toggle_output
#=toggle_autoRead
#=quit_fenrir
1-FENRIR,1-KEY_T=time
1-FENRIR,1-KEY_A=foreward_keypress
#1-FENRIR,1-KEY_F2=inc_speech_volume
#1-FENRIR,1-KEY_F3=dec_sound_volume

View File

@ -78,6 +78,7 @@ punctuationLevel=1
numberOfClipboards=10
# define the current fenrir key
fenrirKeys=KEY_KP0
timeFormat=%H:%M:%P
[promote]
enabled=True

View File

@ -0,0 +1,46 @@
[sound]
enabled=True
driver=sox
theme=default
volume=1.0
[speech]
enabled=True
driver=speechd
rate=0.75
pitch=0.5
module=espeak
voice=de
language=de
volume=0.8
autoReadIncomming=True
[braille]
enabled=False
layout=en
[screen]
driver=linux
screenUpdateDelay=0.4
[keyboard]
device=all
grabDevices=True
ignoreShortcuts=False
keyboardLayout=test
charEcho=True
charDeleteEcho=True
wordEcho=True
interruptOnKeyPress=False
[general]
debugLevel=1
punctuationLevel=1
numberOfClipboards=10
fenrirKeys=KEY_KP0
timeFormat=%H:%M:%P
[promote]
enabled=True
inactiveTimeoutSec=120
list=chrys,test

View File

@ -78,6 +78,7 @@ punctuationLevel=1
numberOfClipboards=10
# define the current fenrir key
fenrirKeys=KEY_KP0
timeFormat=%H:%M:%P
[promote]
enabled=True

View File

@ -38,6 +38,7 @@ debugLevel=0
punctuationLevel=1
numberOfClipboards=10
fenrirKeys=KEY_KP0
timeFormat=%H:%M:%P
[promote]
enabled=True

1
play zone/tintin.bin Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,7 @@
#!/bin/python
import datetime
class command():
def __init__(self):
pass
@ -11,9 +13,14 @@ class command():
# 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",
timeString = environment['runtime']['settingsManager'].getSetting(environment,'general', 'timeFormat')
timeFormat = environment['runtime']['settingsManager'].getSetting(environment,'general', 'timeFormat')
# get the time formatted
timeString = datetime.datetime.strftime(datetime.datetime.now(), timeFormat)
# present the time via speak and braile, there is no soundicon, interrupt the current speech
environment['runtime']['outputManager'].presentText(environment, timeString , soundIcon='', interrupt=True)
timeString = datetime.datetime.strftime(datetime.datetime.now(), '%H:%M:%P')
return environment
def setCallback(self, callback):
pass

View File

@ -34,6 +34,7 @@ settings = {
'punctuationLevel': 1,
'numberOfClipboards': 10,
'fenrirKeys':['82'],
'timeFormat':'%H:%M:%P',
},
'promote':{
'enabled': True,