automatically find enonce
parent
bc59b2aeea
commit
3d26a8ec01
|
|
@ -30,10 +30,19 @@ 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}")
|
||||
return
|
||||
|
||||
tex_file = tex_files[0]
|
||||
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
|
||||
paths = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue