Skip to content

Commit

Permalink
codigo temario
Browse files Browse the repository at this point in the history
  • Loading branch information
s-nt-s committed Oct 4, 2018
1 parent 5854fb7 commit f98fc3b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions crear_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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%")
Binary file modified docs/temario.pdf
Binary file not shown.

0 comments on commit f98fc3b

Please sign in to comment.