Schroedinger-Hat / ImageGoNord-cli

A python client used for ImageGoNord
GNU General Public License v3.0
10 stars 3 forks source link

.JPG extension not working #20

Closed Artmorse closed 6 months ago

Artmorse commented 6 months ago

Describe the bug Using a *.JPG file is not working.

To Reproduce

python3 src/cli.py --img='./input-folder/01.JPG'

Expected behavior This kind of extension should be managed or a clear message should inform the user how it's not working (with the real reason ; see the screenshot below :arrow_down:).

Screenshots image

Wabri commented 6 months ago

You are right, the regex that manage that value is wrong https://github.com/Schrodinger-Hat/ImageGoNord-cli/blob/main/src/cli.py#L149 it should be something like this:

^([A-z]|[\/|\.|\-|\_|\s])*\.([A-z]{3}|[A-z]{4})$

After that change it will work, to be clear I've added capital letter in the last 2 capturing groups.

Do you mind open a pr with this change?

Wabri commented 6 months ago

Closed with merge #21