diff --git a/crear_pdf.py b/crear_pdf.py index c8c2c13..b0bd4da 100755 --- a/crear_pdf.py +++ b/crear_pdf.py @@ -9,14 +9,21 @@ num = re.compile(r"_(\d+).html") -files = sys.argv[1:] or sorted(iglob("./**/*.html", recursive=True)) -for h in files: - fname = os.path.basename(h) +def get_codigo(fname): + if fname == "temario.html": + return "GSI" m = num.search(fname) if m: codigo = fname[0].upper() + m.group(1) else: codigo = fname[0:2].upper() + return codigo + + +files = sys.argv[1:] or sorted(iglob("./**/*.html", recursive=True)) +for h in files: + fname = os.path.basename(h) + codigo = get_codigo(fname) print("Convirtiendo " + fname + " a PDF ...", end="\r") html_to_pdf(h, codigo) print("Convirtiendo " + fname + " a PDF 100%") diff --git a/docs/temario.pdf b/docs/temario.pdf index 1c9f959..4bdb52c 100644 Binary files a/docs/temario.pdf and b/docs/temario.pdf differ