From 57978fda070f850bf0eda80eb773e400978ca171 Mon Sep 17 00:00:00 2001 From: David Denoncin Date: Wed, 27 Aug 2025 20:12:57 +0200 Subject: [PATCH] MAJ sans dossier correction, correction d'un bug local --- documentex/documentex.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/documentex/documentex.py b/documentex/documentex.py index e94d459..2ff34fa 100644 --- a/documentex/documentex.py +++ b/documentex/documentex.py @@ -220,12 +220,12 @@ def documentex(dossier: str, type_document: str): 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)) # Création du dossier de correction avec les fichiers pré-remplis - fichiers = glob.glob(os.path.join(nom_fichier,'*')) - fichiers = [fichier for fichier in fichiers if 'Utils' not in fichier ] - if type_document in constantes.type_document_correction: - os.makedirs(os.path.join(nom_fichier,'Correction')) - shutil.copytree(os.path.join(nom_fichier,'Utils'),os.path.join(os.path.join(nom_fichier,'Correction'),'Utils')) - for fichier in fichiers: - shutil.copy(fichier,os.path.join(nom_fichier,'Correction')) +# fichiers = glob.glob(os.path.join(nom_fichier,'*')) +# fichiers = [fichier for fichier in fichiers if 'Utils' not in fichier ] +# if type_document in constantes.type_document_correction: +# os.makedirs(os.path.join(nom_fichier,'Correction')) +# shutil.copytree(os.path.join(nom_fichier,'Utils'),os.path.join(os.path.join(nom_fichier,'Correction'),'Utils')) +# for fichier in fichiers: +# shutil.copy(fichier,os.path.join(nom_fichier,'Correction')) click.secho(f"Le dossier LaTeX {nom_fichier} a été crée !", fg="red")