diff --git a/candidates.txt b/candidates.txt index cead32e925b1420c84c14cbf7cf755e7e45af8ad..50595dfe1c14e1a1fb22d470b716ac2639ef6f0f 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 7a5c793295e09d7f590a56f887061e369e0a9d7a..16cbf701f48bae1237f7e6e734a274f280b7872d 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 e0f47bac064c51a29a14d2635dec638a4f969096..a5e2ba5b1aa3a9a3dcea169b0caaffcbc9fe0a7c 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 942e4104286e55dae858b6c5404186e0591686a9..1f77247217f119a79ea86a449843140aabcf63ba 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