Set settings¶
Source: data/set_settings.py
Per-set learning and TTS overrides stored as cells on files.csv. An empty
cell inherits the matching app setting from TtsPreferences or
LearnPreferences. Column rules are in
Per-set settings.
The screen is /set/settings.
Per-set learning and TTS overrides stored as empty-or-set cells in files.csv.
An empty cell inherits the matching app setting. A non-empty cell is the set's own value. Columns that belong to the other set kind stay empty.
EffectiveSetSettings
dataclass
¶
Settings that apply to one set after filling blanks from the app.
Attributes:
| Name | Type | Description |
|---|---|---|
kind |
str
|
|
language |
str
|
gTTS language code. |
auto_speak |
bool
|
Pronounce the definition-card word after Check. |
speakers_word_formations |
bool
|
Speaker buttons on word-formation list cards. |
speakers_word |
bool
|
Speaker button on a definition card's word. |
speakers_definition |
bool
|
Speaker button on a definition card's definition. |
retry_until_correct |
bool
|
Require a correct retype before the queue advances. |
queue_size |
int
|
Maximum items drawn into the next practice round. |
uses_app_defaults |
bool
|
Every override column for this kind is empty. |
Source code in src/learning_app/data/set_settings.py
columns_for_kind ¶
Return catalog columns that a set of kind may override.
read_override_cells ¶
Return stored override text for file_name.
Missing catalog rows and blank cells are empty strings. Empty means the set inherits the app setting for that column.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_name
|
str
|
Set basename or path. |
required |
Source code in src/learning_app/data/set_settings.py
effective_set_settings ¶
effective_set_settings(
file_name: str,
) -> EffectiveSetSettings
Resolve one set's settings, using app defaults for empty cells.
Non-empty booleans are explicit (false stays off). A non-empty queue
size is clamped to the range for the set's kind; unparseable text falls
back to the app default. An unknown language code becomes English.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_name
|
str
|
Set basename or path ending in |
required |
Source code in src/learning_app/data/set_settings.py
language_for_set_file ¶
catalog_title ¶
Return the display title for file_name from files.csv.
Falls back to the basename when the catalog row is missing or the title cell is blank.
Source code in src/learning_app/data/set_settings.py
enable_set_overrides ¶
Copy the current app settings into this set's override columns.
Columns for the other kind are cleared. After this call the set no longer follows later changes to the app settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_name
|
str
|
Set basename or path present in |
required |
Source code in src/learning_app/data/set_settings.py
clear_set_overrides ¶
Blank every override column so the set uses app settings again.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_name
|
str
|
Set basename or path present in |
required |
Source code in src/learning_app/data/set_settings.py
set_override_value ¶
Store one override cell when column applies to this set's kind.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file_name
|
str
|
Set basename or path present in |
required |
column
|
str
|
A |
required |
value
|
str
|
Explicit stored text, such as |
required |