automatically find enonce
parent
bc59b2aeea
commit
3d26a8ec01
|
|
@ -30,9 +30,18 @@ def process_directory(directory):
|
||||||
# Find the first .tex file in the directory
|
# Find the first .tex file in the directory
|
||||||
tex_files = glob.glob(os.path.join(directory, "*.tex"))
|
tex_files = glob.glob(os.path.join(directory, "*.tex"))
|
||||||
if not tex_files:
|
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
|
return
|
||||||
|
else:
|
||||||
tex_file = tex_files[0]
|
tex_file = tex_files[0]
|
||||||
|
|
||||||
# Prepare output directories
|
# Prepare output directories
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue