Feat: add list tex files with no tpl
This commit is contained in:
parent
7f40b7c38f
commit
4e7805f40d
@ -7,6 +7,7 @@ Producing then compiling templates
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
import csv
|
import csv
|
||||||
|
import os
|
||||||
|
|
||||||
formatter = logging.Formatter("%(name)s :: %(levelname)s :: %(message)s")
|
formatter = logging.Formatter("%(name)s :: %(levelname)s :: %(message)s")
|
||||||
steam_handler = logging.StreamHandler()
|
steam_handler = logging.StreamHandler()
|
||||||
@ -32,6 +33,7 @@ def build_subject_list_from_qty(qty: int) -> list[dict]:
|
|||||||
subjects.append({"number": str(i + 1).zfill(digit)})
|
subjects.append({"number": str(i + 1).zfill(digit)})
|
||||||
return subjects
|
return subjects
|
||||||
|
|
||||||
|
|
||||||
def build_subjects(students_csv, quantity_subjects):
|
def build_subjects(students_csv, quantity_subjects):
|
||||||
if students_csv:
|
if students_csv:
|
||||||
with open(students_csv, "r") as csv_file:
|
with open(students_csv, "r") as csv_file:
|
||||||
@ -41,6 +43,14 @@ def build_subjects(students_csv, quantity_subjects):
|
|||||||
return build_subject_list_from_qty(quantity_subjects)
|
return build_subject_list_from_qty(quantity_subjects)
|
||||||
|
|
||||||
|
|
||||||
|
def list_tex_files_no_tpl(dir="."):
|
||||||
|
tex_files = []
|
||||||
|
for file in os.listdir(dir):
|
||||||
|
if file.endswith(".tex") and not file.startswith(tpl_):
|
||||||
|
tex_files.append(file)
|
||||||
|
return tex_files
|
||||||
|
|
||||||
|
|
||||||
def bopytex(
|
def bopytex(
|
||||||
template: str,
|
template: str,
|
||||||
working_dir: str,
|
working_dir: str,
|
||||||
|
Loading…
Reference in New Issue
Block a user