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

Improve help messages #1250

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

waldyrious
Copy link

Various small changes to the help messages to make them more readable and consistent, correct some typos, expand missing information, etc.)

)]
pub maximal_file_size: u64,
#[clap(
short,
long,
default_value = "High",
value_parser = parse_similar_images_similarity,
help = "Similairty level (Minimal, VerySmall, Small, Medium, High, VeryHigh, Original)",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks Original is missed?

Copy link
Author

@waldyrious waldyrious Mar 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original is currently not supported as a value that can be passed:

fn parse_similar_images_similarity(src: &str) -> Result<SimilarityPreset, &'static str> {
match src.to_lowercase().replace('_', "").as_str() {
"minimal" => Ok(SimilarityPreset::Minimal),
"verysmall" => Ok(SimilarityPreset::VerySmall),
"small" => Ok(SimilarityPreset::Small),
"medium" => Ok(SimilarityPreset::Medium),
"high" => Ok(SimilarityPreset::High),
"veryhigh" => Ok(SimilarityPreset::VeryHigh),
_ => Err("Couldn't parse the image similarity preset (allowed: Minimal, VerySmall, Small, Medium, High, VeryHigh)"),
}
}

I was actually planning to propose adding it as an option (perhaps renaming it to "Maximal" to make it more accurate) in a separate PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants