From b3e25b9b8be3c31aedb6daea9bcf9bc49e11752c Mon Sep 17 00:00:00 2001
From: Phokopi <phokopi@mail.ru>
Date: Thu, 8 Dec 2022 11:41:12 +0100
Subject: [PATCH] MAJ dec 2022

---
 candidates.txt | 12 ++++++------
 fill.py        |  2 +-
 script.sh      |  4 ++--
 toDot.py       | 38 +++++++++++++++++++-------------------
 4 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/candidates.txt b/candidates.txt
index cead32e..50595df 100644
--- a/candidates.txt
+++ b/candidates.txt
@@ -1,6 +1,6 @@
-A
-B
-C
-D
-E
-F
+DemiiSel
+EquIInoxE
+IILLEGAL
+LiMiTeD
+PRIISME
+SobrIIÉté
diff --git a/fill.py b/fill.py
index 7a5c793..16cbf70 100644
--- a/fill.py
+++ b/fill.py
@@ -1,4 +1,4 @@
-#!/bin/env python3
+#!/usr/bin/python3
 
 """
 This script transforms votes in number form into votes in mathematical form.
diff --git a/script.sh b/script.sh
index e0f47ba..a5e2ba5 100644
--- a/script.sh
+++ b/script.sh
@@ -24,7 +24,7 @@ cat resultats_complets_bruts_shuf.txt | while read line; do
   BALLOT=$(tail -1 resultats_partiels_out.txt)
   echo -e "Bulletin n°${NUMERO_BULLETIN} : ${BALLOT}\n"
   # utilisation de l'appli condorcet, on stocke le résultat dans le fichiet condorcet_output_partiel.txt
-  ./vendor/bin/condorcet election --candidates candidates.txt --votes resultats_partiels_out.txt SchulzeWinning -p > condorcet_output_partiel.txt
+  condorcet election --candidates candidates.txt --votes resultats_partiels_out.txt SchulzeWinning -p > condorcet_output_partiel.txt
   # On stocke la ligne du ou des gagnants dans ligne_gagnants_partiels.txt, à traiter dans toDot.py
   sed -e/Schulze/\{ -e:1 -en\;b1 -e\} -ed condorcet_output_partiel.txt > temp.txt && sed 4!d temp.txt > ligne_gagnants_partiels.txt
   # On extrait la matrice des duels vers matrice_duels_partiel.yaml, puis appelle toDot.py pour générer l'image du graphe dans graphe_partiel.dot.png
@@ -34,7 +34,7 @@ cat resultats_complets_bruts_shuf.txt | while read line; do
   echo -e "Graphe mis à jour.\n"
   # on affiche le classement
   sed -e/Schulze/\{ -e:1 -en\;b1 -e\} -ed condorcet_output_partiel.txt
-  #sleep 2
+  sleep 4
 done
 
 #echo "Fin. ${NUMERO_BULLETIN} bulletins ont été comptabilisés."
diff --git a/toDot.py b/toDot.py
index 942e410..1f77247 100644
--- a/toDot.py
+++ b/toDot.py
@@ -1,32 +1,32 @@
-#!/bin/env python3
+#!/usr/bin/python3
 
 import yaml
 
 translate = {
-    "A" : "A",
-    "B" : "B",
-    "C" : "C",
-    "D" : "D",
-    "E" : "E",
-    "F" : "F"
+    "DemiiSel" : "DemiiSel",
+    "EquIInoxE" : "EquIInoxE",
+    "IILLEGAL" : "IILLEGAL",
+    "LiMiTeD" : "LiMiTeD",
+    "PRIISME" : "PRIISME",
+    "SobrIIÉté" : "SobrIIÉté"
 }
 
 colors = {
-    "A" : "#0C631E",
-    "B" : "#6AD5CF",
-    "C" : "#1B56D3",
-    "D" : "#FF00FF",
-    "E" : "#EF7A37",
-    "F" : "#CF9F00"
+    "DemiiSel" : "#0C631E",
+    "EquIInoxE" : "#6AD5CF",
+    "IILLEGAL" : "#1B56D3",
+    "LiMiTeD" : "#FF00FF",
+    "PRIISME" : "#EF7A37",
+    "SobrIIÉté" : "#CF9F00"
 }
 
 pos = {
-    "A" : "0,0!",
-    "B" : "1,2!",
-    "C" : "3,2!",
-    "D" : "4,0!",
-    "E" : "3,-2!",
-    "F" : "1,-2!"
+    "DemiiSel" : "0,0!",
+    "EquIInoxE" : "1,2!",
+    "IILLEGAL" : "3,2!",
+    "LiMiTeD" : "4,0!",
+    "PRIISME" : "3,-2!",
+    "SobrIIÉté" : "1,-2!"
 }
 
 # On récupère la liste des gagnants
-- 
GitLab