|
|
|
@ -113,3 +113,11 @@ def documentex():
|
|
|
|
|
with open(os.path.join(os.path.join(tex_file_path,'Utils'),nom_fichier),'w') as outfile:
|
|
|
|
|
template = constantes.latex_jinja_env.get_template(os.path.abspath(fichier))
|
|
|
|
|
outfile.write(template.render(date=date,contenu=contenu,tex_file=tex_file,fancyhead=fancyhead,type_ecrit=type_document,short_title=short_title,lycee=lycee,classe=classe,title=title,auteur=auteur,semaine=semaine,liste_noms=liste_noms,td=td,ds_numero=ds_numero,annee=annee,institution=institution,nom_institution=nom_institution,lycee_adresse=lycee_adresse,lycee_complement_adresse=lycee_complement_adresse,auteur_lettre=auteur_lettre,auteur_titre=auteur_titre,auteur_adresse_mail=auteur_adresse_mail,promotion=promotion))
|
|
|
|
|
# Création du dossier de correction avec les fichiers pré-remplis
|
|
|
|
|
fichiers = glob.glob(os.path.join(argv[1],'*'))
|
|
|
|
|
fichiers = [fichier for fichier in fichiers if 'Utils' not in fichier ]
|
|
|
|
|
if type_document in constantes.type_document_correction:
|
|
|
|
|
os.makedirs(os.path.join(argv[1],'Correction'))
|
|
|
|
|
shutil.copytree(os.path.join(argv[1],'Utils'),os.path.join(os.path.join(argv[1],'Correction'),'Utils'))
|
|
|
|
|
for fichier in fichiers:
|
|
|
|
|
shutil.copy(fichier,os.path.join(argv[1],'Correction'))
|
|
|
|
|