Change method name

This commit is contained in:
Benjamin Bertrand 2017-04-16 16:13:14 +03:00
parent b6dd964c97
commit ca0eb160a5

View File

@ -19,6 +19,7 @@ EXPORT_DICT.update(m.__dict__)
EXPORT_DICT.update(rd.__dict__) EXPORT_DICT.update(rd.__dict__)
EXPORT_DICT.update(__builtins__) EXPORT_DICT.update(__builtins__)
def update_export_dict(new_dict): def update_export_dict(new_dict):
"""Update global variable with new_dict """Update global variable with new_dict
@ -26,6 +27,7 @@ def update_export_dict(new_dict):
""" """
EXPORT_DICT.update(new_dict) EXPORT_DICT.update(new_dict)
def feed(template, data, output, force=0): def feed(template, data, output, force=0):
""" Feed template with data to output """ Feed template with data to output
@ -49,7 +51,8 @@ def feed(template, data, output, force=0):
output_f.write(tpl.render(**EXPORT_DICT, **data)) output_f.write(tpl.render(**EXPORT_DICT, **data))
logger.info(f"{template} has been rendered to {output}.") logger.info(f"{template} has been rendered to {output}.")
def compile(latex_file, output_dir=""):
def pdflatex(latex_file, output_dir=""):
""" Compile latex file """ Compile latex file
If output_dir is not set, it produce it next to the latex file. If output_dir is not set, it produce it next to the latex file.
@ -75,6 +78,7 @@ def compile(latex_file, output_dir=""):
logger.info(out) logger.info(out)
logger.debug(f"{latex_file} has been compiled in {output_dir}") logger.debug(f"{latex_file} has been compiled in {output_dir}")
def clean(dirname): def clean(dirname):
""" Clean the directory from aux and log latex files """ """ Clean the directory from aux and log latex files """
cleanning = subprocess.Popen( cleanning = subprocess.Popen(