import ConfigParser
from os import system

try:
    system("rm -fr configs/")
except:
    pass
    
system("mkdir configs/")    

cpt = 0
for k in range(10,10000,10):
    config = ConfigParser.ConfigParser()

    config.add_section("GENERAL")
    config.set("GENERAL", "authentification", "False")
    config.set("GENERAL", "watermark", "resultat.txt")
    config.set("GENERAL", "resultat", "False")
    config.set("GENERAL", "repertoire_images", "images")
    config.set("GENERAL", "repertoire_temporaire", "tempo")
    config.set("GENERAL", "repertoire_resultat", "resultats")
    
    config.add_section("INSERTION")
    config.set("INSERTION", "LSB", "[6,7,8]")
    
    config.add_section("ATTAQUE")
    config.set("ATTAQUE", "attaque", "True")
    config.set("ATTAQUE", "type", "decoupage")
    
    config.add_section("DECOUPAGE")
    config.set("DECOUPAGE", "taille", "30")
    config.set("DECOUPAGE", "position", "(0,0)")
    
    config.add_section("ROTATION")
    config.set("ROTATION", "angle", "2")
    config.set("ROTATION", "nombre", "1")
    
    config.add_section("EVALUATION")
    config.set("EVALUATION", "type", "differences")
    
    config.add_section("DIFFERENCES")
    config.set("DIFFERENCES", "seuil", str(k))
    
    config.add_section("CHIFFREMENT_INSERTION")
    config.set("CHIFFREMENT_INSERTION", "mu", "4")
    config.set("CHIFFREMENT_INSERTION", "Xo", "0.4")
    
    config.add_section("CHIFFREMENT_EXTRACTION")
    config.set("CHIFFREMENT_EXTRACTION", "mu", "4")
    config.set("CHIFFREMENT_EXTRACTION", "Xo", "0.4")
    
    config.add_section("EXTRACTION")
    config.set("EXTRACTION", "LSB", "[6,7,8]")
    
    fichier = open("configs/config"+str(cpt)+".txt", 'w')
    cpt += 1
    config.write(fichier)
    fichier.close()
    
