Azelphur / PokemonGo-CalcyIV-Renamer

Uses adb to send fake tap events to your phone, alongside Calcy IV to automatically rename all your pokemon.
GNU General Public License v3.0
76 stars 33 forks source link

Normalizes unicode digits when checking the regexps against the clipboard #14

Closed esauvisky closed 5 years ago

esauvisky commented 6 years ago

This patch makes it so you can use the same regexp regardless of which CalcyIV numeric scheme/format it's being used (superscript, subscript, the circle thingy with the number inside, and so on).

Feel free to comment on it.

P.S.: sorry about the whitespaces. Relevant changes on lines 8 and 130-134 only.

Azelphur commented 6 years ago

Hmm, I'm not sure I'm a fan of this, it converts ① to 1, so the regex would not match if someone had used ① in the regex (which they would do, this seems counterintuitive)

It would also break if a user had used the custom symbols option? I don't think there's a need to normalize the unicode.

Azelphur commented 6 years ago

That said, I spotted your suggestion about non breaking spaces in a different issue, I think if we do that right, we could void the need for users to set the regexes at all.

We could instruct users to add " $IV%Range$$AttIV$$DefIV$$HpIV$..." to their rename strings, and then have a prewritten regex for that exact layout - it wouldn't effect their renames because like you said it comes after the end of the pokemons name, and it should work with zero config on our side too.

(Advanced users could still change iv_regex if they wanted)