Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make configuration handling a lot better #141

Merged
merged 19 commits into from
Apr 26, 2024
Merged

make configuration handling a lot better #141

merged 19 commits into from
Apr 26, 2024

Commits on Apr 6, 2024

  1. add preliminary support for more advanced configuration options in od…

    …ilia
    
    this is currently using figment as the configuration library, other options include config and simply serde-toml
    this is not yet complete, as huge refactorings are about to take place
    albertotirla authored and TTWNO committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    9f253ef View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d59c338 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4cf5948 View commit details
    Browse the repository at this point in the history
  4. make configuration be working from main, instead of state::new and ma…

    …ke state::new accept the configuration structure as a parameter
    
    this makes it easier to make, for example, speech have the desired rate from startup, logging be initialised from the config with the desired filter and perhaps a path location, stuff like that
    albertotirla authored and TTWNO committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    dc5e613 View commit details
    Browse the repository at this point in the history
  5. fix: screenreader applies configuration properly

    the method join replaced the previously used merge. Apparently, with merge, when conflicts are encountered, it preferes keeping the current value, instead of replacing it. So, config was taken from the default values supplied with the modules, but the values in there were never replaced by those who should have a greatter priority.
    as a consequence, user defined configuration files wouldn't be applied, and the user would understandably be confused by the results
    albertotirla authored and TTWNO committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    cff540b View commit details
    Browse the repository at this point in the history
  6. honor configuration when setting the speech rate

    up to now, configuration was read, but never actually used. This begins a series of changes, perhaps across multiple fronts, to do so.
    This makes `state::new` send a message on the ssip channel, with the request to set the rate to a user defined value
    warning: if somehow the ssip task isn't initialized by the point we get there, the change will be lost in the channel, or may be picked up later than intended
    albertotirla authored and TTWNO committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    7600df9 View commit details
    Browse the repository at this point in the history
  7. env: attempt to parse nested configuration

    we use nested toml tables in our configuration, one table per what we think to be a logical section. However, because we want to add environment variables as configuration sources, we have to be able to parse nested dictionaries.
    In order to do that, beside just using .prefix to filter out variables which don't concern us, we must also split the string of the variable name in keys, and for that we try to use the .split method
    albertotirla authored and TTWNO committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    9eef0b4 View commit details
    Browse the repository at this point in the history
  8. refactor: move loading of configuration in its own function

    Cargo format
    albertotirla authored and TTWNO committed Apr 6, 2024
    Configuration menu
    Copy the full SHA
    be121fb View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2024

  1. remove environment variable configuration, as it's not working with o…

    …ur composite configuration keys
    albertotirla committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    fca8ce5 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2024

  1. fix clippy warning

    albertotirla committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    d06af70 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    666803d View commit details
    Browse the repository at this point in the history
  3. make logging subsystem use the logging level provided in the configur…

    …ation file and make the configuration struct easier to use
    albertotirla committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    1fc4404 View commit details
    Browse the repository at this point in the history
  4. allow odilia to accept a log file and use it to log information, same…

    … for the system journal and tty
    
    * specify tty in the config file for logs to be sent to your terminal
    * use the file option to send it to a file
    * use syslog for writing to the journal, for systemd equipped distros
    albertotirla committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    744a2cf View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1f5d5aa View commit details
    Browse the repository at this point in the history
  6. add volume configuration

    albertotirla committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    981091a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    22f3ad7 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    068c80e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    4aca3a3 View commit details
    Browse the repository at this point in the history
  10. fix formatting

    albertotirla committed Apr 25, 2024
    Configuration menu
    Copy the full SHA
    949a72d View commit details
    Browse the repository at this point in the history