Changed time format slightly, added dte command, added fenrir+d command for date.
This commit is contained in:
parent
49aebcec80
commit
1263ce2709
@ -21,6 +21,7 @@
|
|||||||
#=toggle_autoRead
|
#=toggle_autoRead
|
||||||
#=quit_fenrir
|
#=quit_fenrir
|
||||||
#=time
|
#=time
|
||||||
|
#=date
|
||||||
#=foreward_keypress
|
#=foreward_keypress
|
||||||
#=inc_speech_volume
|
#=inc_speech_volume
|
||||||
#=dec_speech_volume
|
#=dec_speech_volume
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#1-KEY_LEFTCTRL=shut_up
|
1-KEY_LEFTCTRL=shut_up
|
||||||
1-FENRIR,1-KEY_RIGHTCTRL=shut_up
|
1-FENRIR,1-KEY_RIGHTCTRL=shut_up
|
||||||
1-FENRIR,1-KEY_KP8=curr_line
|
1-FENRIR,1-KEY_KP8=curr_line
|
||||||
1-FENRIR,1-KEY_KP7=prev_line
|
1-FENRIR,1-KEY_KP7=prev_line
|
||||||
@ -21,6 +21,7 @@
|
|||||||
#=toggle_autoRead
|
#=toggle_autoRead
|
||||||
#=quit_fenrir
|
#=quit_fenrir
|
||||||
1-FENRIR,1-KEY_T=time
|
1-FENRIR,1-KEY_T=time
|
||||||
|
1-FENRIR,1-KEY_D=time
|
||||||
1-FENRIR,1-KEY_A=foreward_keypress
|
1-FENRIR,1-KEY_A=foreward_keypress
|
||||||
#1-FENRIR,1-KEY_F2=inc_speech_volume
|
#1-FENRIR,1-KEY_F2=inc_speech_volume
|
||||||
#1-FENRIR,1-KEY_F3=dec_sound_volume
|
#1-FENRIR,1-KEY_F3=dec_sound_volume
|
||||||
|
@ -1,89 +0,0 @@
|
|||||||
[sound]
|
|
||||||
# Turn sound on or off:
|
|
||||||
enabled=True
|
|
||||||
|
|
||||||
# Select the driver used to play sounds, choices are sox and gstreamer.
|
|
||||||
# Sox is the default.
|
|
||||||
driver=sox
|
|
||||||
|
|
||||||
# Sound themes. This is the pack of sounds used for sound alerts.
|
|
||||||
# Sound packs may be located at /usr/share/sounds
|
|
||||||
# For system wide availability, or ~/.local/share/fenrir/sounds
|
|
||||||
# For the current user.
|
|
||||||
theme=default
|
|
||||||
|
|
||||||
# Sound volume controls how loud the sounds for your chosen soundpack are.
|
|
||||||
# 0 is quietest, 1.0 is loudest.
|
|
||||||
volume=1.0
|
|
||||||
|
|
||||||
[speech]
|
|
||||||
# Turn speech on or off:
|
|
||||||
enabled=True
|
|
||||||
|
|
||||||
# Select speech driver, options are speechd (default) or espeak:
|
|
||||||
driver=speechd
|
|
||||||
|
|
||||||
# The rate selects how fast fenrir will speak. Options range from 0, slowest, to 1.0, fastest.
|
|
||||||
rate=0.45
|
|
||||||
|
|
||||||
# Pitch controls the pitch of the voice, select from 0, lowest, to 1.0, highest.
|
|
||||||
pitch=0.5
|
|
||||||
|
|
||||||
# Volume controls the loudness of the voice, select from 0, quietest, to 1.0, loudest.
|
|
||||||
volume=1.0
|
|
||||||
|
|
||||||
# Module is used for speech-dispatcher, to select the speech module you want to use.
|
|
||||||
# Consult speech-dispatcher's configuration and help ti find out which modules are available.
|
|
||||||
# The default is espeak.
|
|
||||||
module=espeak
|
|
||||||
|
|
||||||
# Voice selects the varient you want to use, for example, f5 will use the female voice #5 in espeak,
|
|
||||||
# or if using the espeak module in speech-dispatcher. To find out which voices are available, consult the documentation provided with your chosen synthesizer.
|
|
||||||
voice=
|
|
||||||
|
|
||||||
# Select the language you want fenrir to use.
|
|
||||||
language=english-us
|
|
||||||
|
|
||||||
# Read new text as it happens?
|
|
||||||
autoReadIncomming=True
|
|
||||||
|
|
||||||
[braille]
|
|
||||||
#braille is not implemented yet
|
|
||||||
enabled=False
|
|
||||||
layout=en
|
|
||||||
|
|
||||||
[screen]
|
|
||||||
driver=linux
|
|
||||||
encoding=cp850
|
|
||||||
screenUpdateDelay=0.4
|
|
||||||
|
|
||||||
[keyboard]
|
|
||||||
device=all
|
|
||||||
# gives fenrir exclusive access to the keyboard and let consume keystrokes. just disable on problems.
|
|
||||||
grabDevices=True
|
|
||||||
ignoreShortcuts=False
|
|
||||||
# the current shortcut layout located in /etc/fenrir/keyboard
|
|
||||||
keyboardLayout=desktop
|
|
||||||
# echo chars while typing.
|
|
||||||
charEcho=False
|
|
||||||
# echo deleted chars
|
|
||||||
charDeleteEcho=True
|
|
||||||
# echo word after pressing space
|
|
||||||
wordEcho=True
|
|
||||||
# interrupt speech on any keypress
|
|
||||||
interruptOnKeyPress=False
|
|
||||||
|
|
||||||
[general]
|
|
||||||
debugLevel=0
|
|
||||||
punctuationLevel=1
|
|
||||||
numberOfClipboards=10
|
|
||||||
# define the current fenrir key
|
|
||||||
fenrirKeys=KEY_KP0
|
|
||||||
timeFormat=%H:%M:%P
|
|
||||||
|
|
||||||
[promote]
|
|
||||||
enabled=True
|
|
||||||
inactiveTimeoutSec=120
|
|
||||||
list=
|
|
||||||
|
|
||||||
|
|
@ -40,6 +40,7 @@ punctuationLevel=1
|
|||||||
numberOfClipboards=10
|
numberOfClipboards=10
|
||||||
fenrirKeys=KEY_KP0
|
fenrirKeys=KEY_KP0
|
||||||
timeFormat=%H:%M:%P
|
timeFormat=%H:%M:%P
|
||||||
|
dateFormat="%A, %B %d, %Y"
|
||||||
|
|
||||||
[promote]
|
[promote]
|
||||||
enabled=True
|
enabled=True
|
||||||
|
@ -79,7 +79,8 @@ punctuationLevel=1
|
|||||||
numberOfClipboards=10
|
numberOfClipboards=10
|
||||||
# define the current fenrir key
|
# define the current fenrir key
|
||||||
fenrirKeys=KEY_KP0
|
fenrirKeys=KEY_KP0
|
||||||
timeFormat=%H:%M:%P
|
timeFormat=%H:%M%P
|
||||||
|
dateFormat="%A, %B %d, %Y"
|
||||||
|
|
||||||
[promote]
|
[promote]
|
||||||
enabled=True
|
enabled=True
|
||||||
|
@ -40,6 +40,7 @@ punctuationLevel=1
|
|||||||
numberOfClipboards=10
|
numberOfClipboards=10
|
||||||
fenrirKeys=KEY_KP0
|
fenrirKeys=KEY_KP0
|
||||||
timeFormat=%H:%M:%P
|
timeFormat=%H:%M:%P
|
||||||
|
dateFormat="%A, %B %d, %Y"
|
||||||
|
|
||||||
[promote]
|
[promote]
|
||||||
enabled=True
|
enabled=True
|
||||||
|
28
src/fenrir-package/commands/commands/date.py
Normal file
28
src/fenrir-package/commands/commands/date.py
Normal 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
|
@ -9,10 +9,10 @@ class command():
|
|||||||
#this is the way to load the settings:
|
#this is the way to load the settings:
|
||||||
# general is the section in the config file, timeFormat is the variable
|
# general is the section in the config file, timeFormat is the variable
|
||||||
# this has to been added to settings.conf in sectino [general]
|
# 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 following has to been added to core/settings.py to the key 'general'
|
||||||
# the settings.py is used for default values
|
# the settings.py is used for default values
|
||||||
# 'timeFormat':"%H:%M;%P",
|
# 'timeFormat':"%I:%M%P",
|
||||||
timeFormat = environment['runtime']['settingsManager'].getSetting(environment,'general', 'timeFormat')
|
timeFormat = environment['runtime']['settingsManager'].getSetting(environment,'general', 'timeFormat')
|
||||||
|
|
||||||
# get the time formatted
|
# get the time formatted
|
||||||
|
@ -35,7 +35,8 @@ settings = {
|
|||||||
'punctuationLevel': 1,
|
'punctuationLevel': 1,
|
||||||
'numberOfClipboards': 10,
|
'numberOfClipboards': 10,
|
||||||
'fenrirKeys':['82'],
|
'fenrirKeys':['82'],
|
||||||
'timeFormat':'%H:%M:%P',
|
'timeFormat':'%I:%M%P',
|
||||||
|
'dateFormat':'%A, %B %d, %Y',
|
||||||
},
|
},
|
||||||
'promote':{
|
'promote':{
|
||||||
'enabled': True,
|
'enabled': True,
|
||||||
|
Loading…
Reference in New Issue
Block a user