radlinskii / donkeytype

typing test TUI app
MIT License
15 stars 16 forks source link

add description about adding the configuration to config file to help command #67

Open radlinskii opened 1 week ago

radlinskii commented 1 week ago

currently help command displays detailed information about configuration passed as arguments, but has zero information about adding default configuration to the config file and it's path

Aditya-PS-05 commented 1 week ago

Please assign it to me.

Aditya-PS-05 commented 5 days ago

I need more description to work upon it. Can you provide it?

radlinskii commented 5 days ago

ah sure, so by help command I mean when you run

donkeytype --help or donkeytype help or during development it's cargo run -- --help or cargo run --help

When you run it, you get detailed information about the possible arguments and different ways you can start the app, but there is no information about adding configuration of the app to e.g. ~/.config/donkeytype.config.json file.

It is described in the readme https://github.com/radlinskii/donkeytype?tab=readme-ov-file#configuration and should be added as well as description to the help command.

I think the possible solution is to provide description to long_about to https://github.com/radlinskii/donkeytype/blob/e24e980d16930c41492d3910e49652c8322f274d/src/args.rs#L8

Aditya-PS-05 commented 5 days ago
long_about = "donkeytype is a minimalistic CLI typing test. You can configure options like duration, number inclusion, symbols, and uppercase letters either via command-line arguments or by using a config file.

To set default configurations, create a JSON file at ~/.config/donkeytype/donkeytype-config.json. This allows setting parameters such as duration, dictionary path, ratios, and even custom colors for correct and incorrect matches.

Example config:
{
    \"duration\": 60,
    \"dictionary_path\": \"/usr/share/dict/words\",
    \"uppercase_ratio\": 0.3,
    \"colors\": { \"correct_match_fg\": \"green\" }
}

For full details, see the README."

Is this description good.

I know this being much longer. Any suggestions or review to make it shorter to look good or do you like it,

radlinskii commented 4 days ago

The only issue with it is that I think on different OS the path to the co fig is different, not sure if we can determine which is it is and display different path here, or just write that on different OS it can be different.