1
0
Fork 0
A fast screenreader for the *nix desktop. https://github.com/odilia-app/odilia
Go to file
albertotirla 7a91a84b2c
make configuration handling a lot better (#141)
* add preliminary support for more advanced configuration options in odilia

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

* refactor state a bit, to create config.toml from scratch based on default values

* refactor State::new to use figment directly

* make configuration be working from main, instead of state::new and make 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

* 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

* 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

* 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

* refactor: move loading of configuration in its own function

Cargo format

* remove environment variable configuration, as it's not working with our composite configuration keys

* fix clippy warning

* fix configuration again not joining properly

* make logging subsystem use the logging level provided in the configuration file and make the configuration struct easier to use

* 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

* add pitch to the configuration

* add volume configuration

* make output module configurable and run the formatter a bit

* add language and voice to the configuration

* make punctuation reporting configurable

* fix formatting
2024-04-26 13:19:28 -06:00
.github/workflows Fix CI upon Cargo.lock change issue 2024-03-06 17:21:25 -07:00
.vscode add reading of freedesktop notifications (#125) 2024-03-03 01:46:22 +02:00
cache Revert "Update to atspi v0.21.0" 2024-04-26 12:49:49 -06:00
common make configuration handling a lot better (#141) 2024-04-26 13:19:28 -06:00
input Better-logging (#140) 2024-04-05 23:30:33 -06:00
odilia make configuration handling a lot better (#141) 2024-04-26 13:19:28 -06:00
odilia-notify Merge pull request #135 from odilia-app/notification-improvements 2024-03-08 18:02:58 -07:00
scripts Remmove script to start odilia 2023-03-23 10:21:39 -06:00
tts Better-logging (#140) 2024-04-05 23:30:33 -06:00
.envrc Add .envrc and shell.nix for Nix / Direnv users 2022-08-22 11:49:45 +01:00
.gitignore Remove Cargo.lock from .gitignore 2023-02-23 18:19:03 -07:00
CHANGELOG.md Update CHANGELOG 2022-02-13 19:13:19 +00:00
CONTRIBUTING.md fix md typo 2024-02-24 18:52:52 -05:00
Cargo.lock make configuration handling a lot better (#141) 2024-04-26 13:19:28 -06:00
Cargo.toml Revert "Update to atspi v0.21.0" 2024-04-26 12:49:49 -06:00
LICENSE Initial commit with license 2022-02-07 19:14:09 +00:00
README.md Update REAMDE with correct channel names 2024-04-03 16:27:19 -06:00
rustfmt.toml Disable unstable options 2022-12-13 18:58:48 -07:00
shell.nix Nix: Add clippy to nativeBuildInputs 2022-08-23 20:11:53 +01:00

README.md

Odilia Screen Reader

Build CI codecov

Welcome to Odilia

Odilia is a screen reader for the Linux desktop. It's written in Rust, for maximum performance and stability.

Status: Beta

This is absolutely not production ready in any way!
Everything is in a fairly early stage and we're changing things on a daily basis. However, Odilia is somewhat useable, and will not crash randomly or cause weird behaviour in other applications.
Try it out! See if it works for you!

Prerequisites

The MSRV for Odilia is 1.65.

You will need to have speech-dispatcher installed and running before you can start Odilia. To test that speech dispatcher is indeed working properly, try running this command:

spd-say "hello, world!"

if you heard a voice saying "hello, world!", you can proceed to installing. Otherwise, check if sound is working on the computer in general.

Build and install

To build odilia, copy paste the following on your command line . The following snippet will clone, build and install it for you, all at once without user interaction. The final binaries will be located in ~/.cargo/bin

git clone https://github.com/odilia-app/odilia  && \
cd odilia && \
cargo install --path odilia

Running

Simply type odilia in your terminal!

Community

You can find us in the following places:

  • Discord
  • IRC: irc.libera.chat
    • #odilia-dev (development)
    • #odilia-general (general)
    • #odilia-offtopic (off-topic)
  • Matrix: stealthy.club
    • #odilia-dev (development)
    • #odilia-general (general)
    • #odilia-offtopic (off-topic)

Contributing

We are excited to accept new contributions to this project; in fact, we already have! Sometimes there may be missing documentation or lack of examples. Please, reach out to us, make an issue, or a pull request and we will continue to improve Odilia with your help. By the way, a huge thank you to all who have contributed so far, and who will continue to do so in the future!

See CONTRIBUTING.md for more detail on how to contribute.

License

The Odilia screen reader is licensed under the GPL v3.