automatically find enonce

master
Sébastien Miquel 2026-03-31 11:14:52 +02:00
parent bc59b2aeea
commit 3d26a8ec01
1 changed files with 13 additions and 4 deletions

View File

@ -30,9 +30,18 @@ def process_directory(directory):
# Find the first .tex file in the directory
tex_files = glob.glob(os.path.join(directory, "*.tex"))
if not tex_files:
print(f"No .tex file found in {directory}")
print(f"No .tex file found in {directory}. Looking in /Staging/Interro/")
if directory[-1] == "/":
int_name = directory[:-1]
else:
int_name = directory
tex_path = os.path.join("~/Prépa/Staging/Interro/", int_name, ".tex")
if os.path.exists(tex_path):
tex_file = tex_path
else:
print("Not found.")
return
else:
tex_file = tex_files[0]
# Prepare output directories