johnridesabike / coronate

A Swiss-style chess tournament management app.
https://coronate.netlify.app/
Mozilla Public License 2.0
140 stars 22 forks source link

output results and current standing : python script #90

Closed tissatussa closed 2 months ago

tissatussa commented 8 months ago

i just wrote a simple python-3 script to process a Coronate tournament .json file and output the results and current standings : ZIPped json-to-output.zip (includes my own sample tournament .json file for reference).

for each round the output is like my example below. you can adjust some parameters in the code, eg. the header words (Dutch here). the output is displayed in terminal, you can copy that. tables are auto-formatted (while monospaced) according to the longest player name. standings are sorted on winning percentage, with subkey the lowest [#] games.

Ronde 6 -----

Mart Wennink         - Geert Postmus       1-0
Mousa Zouhar         - Rinke De Wolf       ½-½
Riny Westveer        - Gerhard Groenewoudt 1-0
Ben Reinink          - Roelof Berkepeis    1-0
Alfons Meijerink     - Benjamin NN         0-1
Jarich Van der Molen - Peter Goud          1-0
Louk De Wit          - Leen Van Willigen   ½-½
Rienk Van der Werff  - Egor Fomin          0-1
Johan Alberts        - Ali Al Hasan        0-1
Stan Boerrigter      - Jan Tijtsma         1-0

[#] naam                     punt games perc
--------------------------------------------
 1. Jarich Van der Molen      3    3     100
 2. Egor Fomin                3    3     100
 3. Benjamin NN               3    3     100
 4. Mart Wennink              5    5     100
 5. Wouter Grouve             1½   2      75
 6. Riny Westveer             4½   6      75
 7. Geert Postmus             4½   6      75
 8. Stan Boerrigter           2    3      67
 9. Ria Elfring               2    3      67
10. Joost Haveman             2    3      67
11. Rinke De Wolf             4    6      67
12. Mousa Zouhar              4    6      67
13. Ben Reinink               4    6      67
14. Jos Poelsma               2½   4      62
15. Benjo Hilbrink            2½   4      62
16. Tom Scheper               1½   3      50
17. Theo Matton               2½   5      50
18. Roelof Berkepeis          3    6      50
19. Gerhard Groenewoudt       3    6      50
20. Jan Tijtsma               2½   6      42
21. Alfons Meijerink          2½   6      42
22. Fabian Klaster            2    5      40
23. Rienk Van der Werff       1    3      33
24. Omar Mahmutovic           1    3      33
25. Jan Wissink               1    3      33
26. Gunther Schaning          1    3      33
27. Anne Bergen               1    3      33
28. Ali Al Hasan              1    3      33
29. Peter Goud                2    6      33
30. Leen Van Willigen         2    6      33
31. Ernst Treffers            1½   5      30
32. Louk De Wit               1½   6      25
33. Vincent Van Bruchem       1    5      20
34. Jorick Moes                ½   3      17
35. Jan Beute                 0    1       0
36. Jose Van der Voort        0    2       0
37. Johan Alberts             0    3       0
38. Eugene Maatje             0    3       0
johnridesabike commented 8 months ago

Very cool! Thanks for sharing this.

tissatussa commented 8 months ago

my source code contains no CopyRight or so, you can just use it .. did you try it with own .json files ? Although i wrote it in Python, which is not the same language as you used for Coronate, it's pretty common, i guess others will have no trouble using it : $ python3 ./my.py you may mention the existence of my script in your README, and even integrate it into your own program !?

Btw. I didn't try to alter the order of the player names .. does it help to make them alphabetical in their list(s) ? This bug () was still annoying during my last tournament..

johnridesabike commented 8 months ago

I have not tried it yet, but when I have time to work on Coronate again I'll take a closer look and see about integrating some of its features.

tissatussa commented 2 months ago

did you integrate this Python script yet, or mention it in the README ? Lately i used it again to get the newest results list and ranking, i find it very convenient.

Notes:

johnridesabike commented 2 months ago

Thanks for the reminder. I just added a link!