TonyLHansen / atastandings

ATA (American Taekwondo Association) World and State Standings Printer
MIT License
0 stars 1 forks source link

Option to leave out full-text of division in '-B' output #3

Closed derekatkins closed 3 months ago

derekatkins commented 3 months ago

Hi, When using the -B option, we get a single line with all the data for a single user (yay). However, the output is hard to parse mechanically due to the text-output. E.g.:

ISAAC ATKINS SANDY SPRINGS, GA | Southeast 1 BCOB Forms Boys Color Belt 9 - 10 Years Old 55 | Southeast 1 BCOB Weapons Boys Color Belt 9 - 10 Years Old 40 | Southeast 32 BCOB Combat Weapons Boys Color Belt 9 - 10 Years Old 7 | Southeast 8 BCOB Sparring Boys Color Belt 9 - 10 Years Old 25 | Southeast 1 BCOB Creative Forms Boys Creative Forms Color Belt 9 - 10 Years Old 67 | Southeast 1 BCOB Creative Weapons Boys Creative Weapons Color Belt 9 - 10 Years Old 42 | Southeast 1 BCOB X-Treme Forms Boys X-Treme Forms Color Belt 9 - 10 Years Old 54 | Southeast 2 BCOB X-Treme Weapons Boys X-Treme Weapon Color Belt 9 - 10 Years Old 39

How hard would it be to elide the full text of the division (e.g. "Boys Color Belt 9 - 10 Years Old"), so this looks more like:

ISAAC ATKINS SANDY SPRINGS, GA | Southeast 1 BCOB Forms 55 | Southeast 1 BCOB Weapons 40 | ....

Even better would be a way to make it more compact/scannable:

ISAAC ATKINS | SANDY SPRINGS, GA | Southeast | 1 BCOB Forms 55 | 1 BCOB Weapons 40 | ...

Specifically, I think it would help by separating out the name from the location, and pulling out the district into printing once. I think it unlikely that a competitor would be in multiple districts (although certainly possible they could be in multiple divisions, which is why I left that in the individual records).

Rationale is that "BCOB" is sufficient without the full-text of the division printed. Worst case we could add a "division parser" which would convert "BCOB" into "Boys Color Belt 9 - 10 Years Old")

TonyLHansen commented 3 months ago

I'll be adding a --minimize district option.

TonyLHansen commented 3 months ago

fix pushed