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

Specify default values for color arguments #19

Merged

Conversation

elfenlaid
Copy link
Contributor

Follow up to the ArgumentParser migration and a related conversation #14 (comment)

The change leverages ArgumentParser's default values to generate a more insightful help message

Without default values:

  --color <color>         Specify a valid hex color code in a case insensitive format: '#rrggbb' | '#rrggbbaa'
                              or
                          Provide a named color: 'snow' | 'snow1' | ...
                          Complete list of named colors: https://imagemagick.org/script/color.php#color_names
  --tint-color <tint-color>
                          Specify a valid hex color code in a case insensitive format: '#rrggbb' | '#rrggbbaa'
                              or
                          Provide a named color: 'snow' | 'snow1' | ...
                          Complete list of named colors: https://imagemagick.org/script/color.php#color_names

With default values:

  --color <color>         Specify a valid hex color code in a case insensitive format: '#rrggbb' | '#rrggbbaa'
                              or
                          Provide a named color: 'snow' | 'snow1' | ...
                          Complete list of named colors: https://imagemagick.org/script/color.php#color_names
                          (default: randomly selected from #EE6D6D | #A36DEE | #4C967E | #3B8A4B | #CABA0E | #E68C31 | #E11818)
  --tint-color <tint-color>
                          Specify a valid hex color code in a case insensitive format: '#rrggbb' | '#rrggbbaa'
                              or
                          Provide a named color: 'snow' | 'snow1' | ...
                          Complete list of named colors: https://imagemagick.org/script/color.php#color_names (default: white)

Note the (default: value specification at the end of each help entry

@arthurpalves
Copy link
Owner

💯

@arthurpalves arthurpalves merged commit 80a7411 into arthurpalves:rc-argument-parser Jun 29, 2020
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