Skip to content

Commit 4aedc1a

Browse files
committed
Merge branch 'dev' into main
2 parents 19d4d65 + 825cdf3 commit 4aedc1a

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

batch_process.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,13 @@ def filter_tex_files(tex_files: List[str], main_path: str = None) -> List[str]:
145145
result = []
146146
for tex_file in tex_files:
147147
if main_path and os.path.dirname(os.path.dirname(tex_file)) != main_path:
148+
log.info(f"not the valid tex file: {tex_file}")
148149
continue
149150
# prevent processing previous generated files
150-
if os.path.basename(tex_file).startswith("paper_"):
151-
log.debug(f"{tex_file} should be deleted.")
152-
continue
153151
try:
154152
with open(tex_file) as f:
155153
content = f.read()
156-
if content.find(r"\\begin{document}") == -1:
154+
if "\\begin{document}" not in content:
157155
continue
158156
result.append(tex_file)
159157
except UnicodeDecodeError:

0 commit comments

Comments
 (0)