Codestyling
This commit is contained in:
parent
d900f9296a
commit
b0a5de05aa
@ -1,4 +1,5 @@
|
|||||||
import argparse, json
|
import argparse
|
||||||
|
import json
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from .template import DocxTemplate, TemplateError
|
from .template import DocxTemplate, TemplateError
|
||||||
@ -109,7 +110,7 @@ def render_docx(doc:DocxTemplate, json_data: dict) -> DocxTemplate:
|
|||||||
doc.render(json_data)
|
doc.render(json_data)
|
||||||
return doc
|
return doc
|
||||||
except TemplateError as e:
|
except TemplateError as e:
|
||||||
raise RuntimeError(f'An error ocurred while trying to render the docx') from e
|
raise RuntimeError('An error ocurred while trying to render the docx') from e
|
||||||
|
|
||||||
|
|
||||||
def save_file(doc: DocxTemplate, parsed_args: dict) -> None:
|
def save_file(doc: DocxTemplate, parsed_args: dict) -> None:
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import sys, os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
TEMPLATE_PATH = 'templates/module_execute_tpl.docx'
|
TEMPLATE_PATH = 'templates/module_execute_tpl.docx'
|
||||||
@ -19,4 +19,3 @@ os.system(cmd)
|
|||||||
|
|
||||||
if output_path.exists():
|
if output_path.exists():
|
||||||
print(f' --> File {output_path.resolve()} has been generated.')
|
print(f' --> File {output_path.resolve()} has been generated.')
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user