Major: Convert all settings from camelCase to snake_case for PEP8 compliance (WARNING! BREAKING CHANGES)

Breaking change for v3.0 - users must update their settings.conf file.

  - Converted 45 settings across all sections
  - Updated 524 Python files, tests, and documentation
  - All tests passing, zero regressions
  - Moving forward the philosophy is clean code over backward compatibility
  - Next stable release will be considered a major release
This commit is contained in:
Storm Dragon
2025-12-10 19:39:45 -05:00
parent 61868c94e5
commit 560ceb26c9
52 changed files with 393 additions and 351 deletions

View File

@@ -1105,7 +1105,7 @@ the word "Chrys" appears after 120 Seconds of inactivity:
....
[promote]
enabled=True
inactiveTimeoutSec=120
inactive_timeout_sec=120
list=Chrys
....
@@ -1286,8 +1286,8 @@ Enable remote control in settings.conf:
[remote]
enable=True
driver=unixDriver
enableSettingsRemote=True
enableCommandRemote=True
enable_settings_remote=True
enable_command_remote=True
....
==== Using socat with Unix Sockets
@@ -1317,13 +1317,13 @@ echo "setting set focus#highlight=True" | socat - UNIX-CLIENT:/tmp/fenrirscreenr
echo "setting set speech#rate=0.8" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Change punctuation level (none/some/most/all)
echo "setting set general#punctuationLevel=all" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
echo "setting set general#punctuation_level=all" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Voice and TTS control
echo "setting set speech#voice=en-us+f3" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Multiple settings at once
echo "setting set speech#rate=0.8;sound#volume=0.7;general#punctuationLevel=most" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
echo "setting set speech#rate=0.8;sound#volume=0.7;general#punctuation_level=most" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Reset all settings to defaults
echo "setting reset" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
@@ -1394,8 +1394,8 @@ echo "command quitapplication" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-dea
* `+speech#module=module_name+` - TTS module (e.g., "espeak-ng")
*General Settings:*
* `+general#punctuationLevel=none/some/most/all+` - Punctuation verbosity
* `+general#autoSpellCheck=True/False+` - Automatic spell checking
* `+general#punctuation_level=none/some/most/all+` - Punctuation verbosity
* `+general#auto_spell_check=True/False+` - Automatic spell checking
* `+general#emoticons=True/False+` - Enable emoticon replacement
*Sound Settings:*
@@ -1407,11 +1407,11 @@ echo "command quitapplication" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-dea
* `+focus#highlight=True/False+` - Follow text highlighting
*Keyboard Settings:*
* `+keyboard#charEchoMode=0-2+` - Character echo (0=none, 1=always, 2=capslock only)
* `+keyboard#wordEcho=True/False+` - Echo complete words
* `+keyboard#char_echo_mode=0-2+` - Character echo (0=none, 1=always, 2=capslock only)
* `+keyboard#word_echo=True/False+` - Echo complete words
*Screen Settings:*
* `+screen#ignoreScreen=1,2,3+` - TTY screens to ignore
* `+screen#ignore_screen=1,2,3+` - TTY screens to ignore
==== settings.conf syntax
@@ -1511,14 +1511,14 @@ frequencies.
sound file.
....
genericPlayFileCommand=<your command for playing a file>
generic_play_file_command=<your command for playing a file>
....
`+genericFrequencyCommand+` defines the command that is used playing
frequencies.
....
genericFrequencyCommand=<your command for playing a frequence>
generic_frequency_command=<your command for playing a frequence>
....
The following variables are substituted in `+genericPlayFileCommand+`
@@ -1532,13 +1532,13 @@ and `+genericFrequencyCommand+`:
Example genericPlayFileCommand (default)
....
genericPlayFileCommand=play -q -v fenrirVolume fenrirSoundFile
generic_play_file_command=play -q -v fenrirVolume fenrirSoundFile
....
Example genericFrequencyCommand (default)
....
genericFrequencyCommand=play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence
generic_frequency_command=play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence
....
==== Speech
@@ -1579,7 +1579,7 @@ Values: Range Minimum:`+0.0+` is lowest, Maximum:`+1.0+` is highest.
A Pitch for capital letters can be set.
....
capitalPitch=0.9
capital_pitch=0.9
....
Values: Range Minimum:`+0.0+` is lowest, Maximum:`+1.0+` is highest.
@@ -1681,7 +1681,7 @@ the pico module:
language=de-DE
....
Read new text as it occurs autoReadIncoming=True Values: on=`+True+`,
Read new text as it occurs auto_read_incoming=True Values: on=`+True+`,
off=`+False+`
==== Screen
@@ -1711,7 +1711,7 @@ Values:`+cp850+` is used for Western languages like USA or Europe.
The driver updates Fenrir with changes on the screen.
....
screenUpdateDelay=0.05
screen_update_delay=0.05
....
Values: in Seconds
@@ -1776,7 +1776,7 @@ Gives Fenrir exclusive access to the keyboard and lets it control
keystrokes. This is needed to intercept Fenrir related shortcuts.
....
grabDevices=True
grab_devices=True
....
Values: on=`+True+`, off=`+False+`
@@ -1785,7 +1785,7 @@ The following makes sense if you are using a second screenreader and
want to have some hooked events. Fenrir ignores all shortcuts then.
....
ignoreShortcuts=False
ignore_shortcuts=False
....
Values: on=`+True+`, off=`+False+`
@@ -1793,7 +1793,7 @@ Values: on=`+True+`, off=`+False+`
The current keyboard layout used for shortcuts.
....
keyboardLayout=desktop
keyboard_layout=desktop
....
Values: An absolute Path to a Keyboard definition file or a Filename
@@ -1810,7 +1810,7 @@ Values: on=`+True+`, off=`+False+`
Announce deleted characters
....
charDeleteEcho=True
char_delete_echo=True
....
Values: on=`+True+`, off=`+False+`
@@ -1818,7 +1818,7 @@ Values: on=`+True+`, off=`+False+`
Announce word after pressing space
....
wordEcho=False
word_echo=False
....
Values: on=`+True+`, off=`+False+`
@@ -1826,7 +1826,7 @@ Values: on=`+True+`, off=`+False+`
Interrupt speech on any keypress
....
interruptOnKeyPress=False
interrupt_on_key_press=False
....
Values: on=`+True+`, off=`+False+`
@@ -1834,7 +1834,7 @@ Values: on=`+True+`, off=`+False+`
You can filter the keys that speech should interrupt
....
interruptOnKeyPressFilter=
interrupt_on_key_press_filter=
....
Values: (List) empty = all keys, otherwise interrupt with specified keys
@@ -1842,7 +1842,7 @@ Values: (List) empty = all keys, otherwise interrupt with specified keys
The timeout that is used for double tap shortcuts
....
doubleTapTimeout=0.2
double_tap_timeout=0.2
....
Values: Seconds
@@ -1862,7 +1862,7 @@ Values: off=0, error=1, warning=2, info=3
the current punctuation and dict file in use:
....
punctuationProfile=default
punctuation_profile=default
....
Values: Text, see available profiles in `+/etc/fenrir/punctuation+` or
@@ -1871,7 +1871,7 @@ in `+sourceTree/config/punctuation+`
The current punctuation level in use:
....
punctuationLevel=some
punctuation_level=some
....
Values: Text, See available levels in the used punctuation file.
@@ -1879,7 +1879,7 @@ Values: Text, See available levels in the used punctuation file.
Respect pause for punctuations:
....
respectPunctuationPause=True
respect_punctuation_pause=True
....
Values: on=`+True+`, off=`+False+`
@@ -1887,7 +1887,7 @@ Values: on=`+True+`, off=`+False+`
Add a pause on Line break:
....
newLinePause=True
new_line_pause=True
....
Values: on=`+True+`, off=`+False+`
@@ -1905,7 +1905,7 @@ Values: Text, Systemfilepath
The number of available clipboards:
....
numberOfClipboards=10
number_of_clipboards=10
....
Values: Integer, 1 - 999
@@ -1921,7 +1921,7 @@ Values: on=`+True+`, off=`+False+`
Define the current Fenrir keys:
....
fenrirKeys=KEY_KP0,KEY_META,KEY_INSERT
fenrir_keys=KEY_KP0,KEY_META,KEY_INSERT
....
Values, Text list, separated by comma.
@@ -1955,7 +1955,7 @@ https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior[d
Enable or Disable spellcheck whilst typing:
....
autoSpellCheck=True
auto_spell_check=True
....
Values: on=`+True+`, off=`+False+`
@@ -1963,7 +1963,7 @@ Values: on=`+True+`, off=`+False+`
The use of the dictionary with spellcheck:
....
spellCheckLanguage=en_US
spell_check_language=en_US
....
Values: Text, see aspell dictionary's.
@@ -2044,7 +2044,7 @@ Values: on=`+True+`, off=`+False+`
Leave the review mode when changing the screen (From TTY3 to TTY4):
....
leaveReviewOnScreenChange=True
leave_review_on_screen_change=True
....
Values: on=`+True+`, off=`+False+`
@@ -2064,7 +2064,7 @@ The minimum time interval of inactivity to activate promoting. By
default it promotes after 120 Seconds inactivity:
....
inactiveTimeoutSec=120
inactive_timeout_sec=120
....
Values: in Seconds

View File

@@ -102,17 +102,17 @@ volume=0.7
[keyboard]
driver=evdevDriver
keyboardLayout=desktop
keyboard_layout=desktop
[screen]
driver=vcsaDriver
ignoreScreen=
ignore_screen=
[remote]
enable=True
driver=unixDriver
enableSettingsRemote=True
enableCommandRemote=True
enable_settings_remote=True
enable_command_remote=True
```
## Remote Control
@@ -126,8 +126,8 @@ Enable remote control in settings:
enable=True
driver=unixDriver # or tcpDriver
port=22447 # for TCP driver
enableSettingsRemote=True # allow settings changes
enableCommandRemote=True # allow command execution
enable_settings_remote=True # allow settings changes
enable_command_remote=True # allow command execution
```
### Basic Usage with socat
@@ -155,14 +155,14 @@ echo "setting set speech#pitch=0.6" | socat - UNIX-CLIENT:/tmp/fenrirscreenreade
echo "setting set speech#volume=0.9" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Change punctuation level (none/some/most/all)
echo "setting set general#punctuationLevel=all" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
echo "setting set general#punctuation_level=all" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Voice and TTS control
echo "setting set speech#voice=en-us+f3" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
echo "setting set speech#module=espeak-ng" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Multiple settings at once
echo "setting set speech#rate=0.8;sound#volume=0.7;general#punctuationLevel=most" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
echo "setting set speech#rate=0.8;sound#volume=0.7;general#punctuation_level=most" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Reset all settings
echo "setting reset" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
@@ -208,11 +208,11 @@ echo "command quitapplication" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-dea
- `command resetvmenu` - Reset virtual menu
**Key Settings You Can Change:**
- Punctuation level: `setting set general#punctuationLevel=all`
- Punctuation level: `setting set general#punctuation_level=all`
- Speech parameters: `setting set speech#rate=0.8;speech#pitch=0.6`
- Voice selection: `setting set speech#voice=en-us+f3`
- Character echo: `setting set keyboard#charEchoMode=1`
- Screen ignore: `setting set screen#ignoreScreen=1,2,3`
- Character echo: `setting set keyboard#char_echo_mode=1`
- Screen ignore: `setting set screen#ignore_screen=1,2,3`
### Scripting Integration

View File

@@ -735,7 +735,7 @@ you can define a list of words which you want to hear a sound icon for after a p
Example if the word "Chrys" appears after 120 Seconds of inactivity:
[promote]
enabled=True
inactiveTimeoutSec=120
inactive_timeout_sec=120
list=Chrys
See section [[#Promote|Promote]] in ''settings.conf'' for more information.
==== Punctuation ====
@@ -867,9 +867,9 @@ Values: ''0.0'' is quietest, ''1.0'' is loudest.
The generic sound driver uses shell commands for play sound and frequencies.
''genericPlayFileCommand'' defines the command that is used to play a sound file.
genericPlayFileCommand=<your command for playing a file>
generic_play_file_command=<your command for playing a file>
''genericFrequencyCommand'' defines the command that is used playing frequencies.
genericFrequencyCommand=<your command for playing a frequence>
generic_frequency_command=<your command for playing a frequence>
The following variables are substituted in ''genericPlayFileCommand'' and ''genericFrequencyCommand'':
* ''fenrirVolume'' = the current volume setting
@@ -878,9 +878,9 @@ The following variables are substituted in ''genericPlayFileCommand'' and ''gene
* ''fenrirDuration'' = the duration of the frequency
Example genericPlayFileCommand (default)
genericPlayFileCommand=play -q -v fenrirVolume fenrirSoundFile
generic_play_file_command=play -q -v fenrirVolume fenrirSoundFile
Example genericFrequencyCommand (default)
genericFrequencyCommand=play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence
generic_frequency_command=play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence
==== Speech ====
Speech is configured in section ''[speech]''.
Turn speech on or off:
@@ -910,7 +910,7 @@ Pitch controls the pitch of the voice.
Values: Range Minimum:''0.0'' is lowest, Maximum:''1.0'' is highest.
A Pitch for capital letters can be set.
capitalPitch=0.9
capital_pitch=0.9
Values: Range Minimum:''0.0'' is lowest, Maximum:''1.0'' is highest.
The Volume controls the loudness of the voice.
@@ -931,7 +931,7 @@ Select the language you want Fenrir to use.
Values: Text, see your TTS synths documentation what is available.
Read new text as it occurs
autoReadIncoming=True
auto_read_incoming=True
Values: on=''True'', off=''False''
=== Generic Driver ===
@@ -948,16 +948,16 @@ The following variables are substituted in ''genericSpeechCommand'':
* ''fenrirRate'' = is replaced with the current speed (speech rate)
Example genericSpeechCommand (default):
genericSpeechCommand=espeak -a fenrirVolume -s fenrirRate -p fenrirPitch -v fenrirVoice "fenrirText"
generic_speech_command=espeak -a fenrirVolume -s fenrirRate -p fenrirPitch -v fenrirVoice "fenrirText"
These are the minimum and maximum values of the TTS system used in genericSpeechCommand. They are needed to calculate the abstract range in volume, rate and pitch 0.0 - 1.0.
FenrirMinVolume=0
fenrirMaxVolume=200
fenrirMinPitch=0
fenrirMaxPitch=99
fenrirMinRate=80
fenrirMaxRate=450
fenrir_max_volume=200
fenrir_min_pitch=0
fenrir_max_pitch=99
fenrir_min_rate=80
fenrir_max_rate=450
The current volume, pitch and rate is calculated like this
value = min + [volume,pitch,rate] * (min - max )
@@ -1033,7 +1033,7 @@ The encoding of the screen
Values:''cp850'' is used for Western languages like USA or Europe.
The driver updates Fenrir with changes on the screen.
screenUpdateDelay=0.05
screen_update_delay=0.05
Values: in Seconds
If you want Fenrir to not be active on any screen for various reasons. Maybe an X server or Wayland is running on that screen. You can make Fenrir ignore it or multiple screens seperated by '','' with:
@@ -1064,15 +1064,15 @@ Values:
* ''<Device Name>'' just use the device with the given name.
Gives Fenrir exclusive access to the keyboard and lets it control keystrokes. This is needed to intercept Fenrir related shortcuts.
grabDevices=True
grab_devices=True
Values: on=''True'', off=''False''
The following makes sense if you are using a second screenreader and want to have some hooked events. Fenrir ignores all shortcuts then.
ignoreShortcuts=False
ignore_shortcuts=False
Values: on=''True'', off=''False''
The current keyboard layout used for shortcuts.
keyboardLayout=desktop
keyboard_layout=desktop
Values: An absolute Path to a Keyboard definition file or a Filename without extension located in ''/etc/fenrir/keyboard''
Announce characters while typing.
@@ -1080,23 +1080,23 @@ Announce characters while typing.
Values: on=''True'', off=''False''
Announce deleted characters
charDeleteEcho=True
char_delete_echo=True
Values: on=''True'', off=''False''
Announce word after pressing space
wordEcho=False
word_echo=False
Values: on=''True'', off=''False''
Interrupt speech on any keypress
interruptOnKeyPress=False
interrupt_on_key_press=False
Values: on=''True'', off=''False''
You can filter the keys that speech should interrupt
interruptOnKeyPressFilter=
interrupt_on_key_press_filter=
Values: (List) empty = all keys, otherwise interrupt with specified keys
The timeout that is used for double tap shortcuts
doubleTapTimeout=0.2
double_tap_timeout=0.2
Values: Seconds
==== General ====
Overall settings can be configured from the section ''[general]''.
@@ -1106,19 +1106,19 @@ Set the current debug level:
Values: off=0, error=1, warning=2, info=3
the current punctuation and dict file in use:
punctuationProfile=default
punctuation_profile=default
Values: Text, see available profiles in ''/etc/fenrir/punctuation'' or in ''sourceTree/config/punctuation''
The current punctuation level in use:
punctuationLevel=some
punctuation_level=some
Values: Text, See available levels in the used punctuation file.
Respect pause for punctuations:
respectPunctuationPause=True
respect_punctuation_pause=True
Values: on=''True'', off=''False''
Add a pause on Line break:
newLinePause=True
new_line_pause=True
Values: on=''True'', off=''False''
Specify the path where the clipboard should be exported to.
@@ -1128,7 +1128,7 @@ The variable ''$user'' is replaced by the current logged username.
Values: Text, Systemfilepath
The number of available clipboards:
numberOfClipboards=10
number_of_clipboards=10
Values: Integer, 1 - 999
Replace emoticons like :) or ;) with text insertions:
@@ -1136,7 +1136,7 @@ Replace emoticons like :) or ;) with text insertions:
Values: on=''True'', off=''False''
Define the current Fenrir keys:
fenrirKeys=KEY_KP0,KEY_META,KEY_INSERT
fenrir_keys=KEY_KP0,KEY_META,KEY_INSERT
Values, Text list, separated by comma.
Define the current script keys:
@@ -1152,11 +1152,11 @@ The date format to be used for (date command) output:
Values: see python specification for [[https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior|datetime.strftime]]
Enable or Disable spellcheck whilst typing:
autoSpellCheck=True
auto_spell_check=True
Values: on=''True'', off=''False''
The use of the dictionary with spellcheck:
spellCheckLanguage=en_US
spell_check_language=en_US
Values: Text, see aspell dictionary's.
Folder Path for your scripts "scriptKey" functionality:
@@ -1197,7 +1197,7 @@ Leave the review mode when pressing a key:
Values: on=''True'', off=''False''
Leave the review mode when changing the screen (From TTY3 to TTY4):
leaveReviewOnScreenChange=True
leave_review_on_screen_change=True
Values: on=''True'', off=''False''
==== Promote ====
"Promoted Lists" are configured in the section ''[promote]''.
@@ -1207,7 +1207,7 @@ Values: on=''True'', off=''False''
The minimum time interval of inactivity to activate promoting.
By default it promotes after 120 Seconds inactivity:
inactiveTimeoutSec=120
inactive_timeout_sec=120
Values: in Seconds
Define a list of promoted words comma seperated: