Skip to content

Commit

Permalink
Correct concats between different types
Browse files Browse the repository at this point in the history
  • Loading branch information
fthrslntgy committed Dec 20, 2023
1 parent f5fdcff commit 9af8764
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions helpers/docx2pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

class Converter():
def docx2pdf(file_name):
docx_file = "./results/" + file_name + ".docx"
docx_file = "./results/%d.csv" % file_name
os.system('soffice --headless --norestore --writer --convert-to pdf ./%s --outdir %s' % (docx_file, "./reports"))
os.remove(docx_file)

return "./reports/" + file_name + ".pdf"
return "./reports/%s.pdf" % docx_file

def docx2preview(file_name):
os.system('soffice --headless --norestore --writer --convert-to pdf %s --outdir %s' % (file_name, "./templates"))
Expand Down
2 changes: 1 addition & 1 deletion helpers/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ def render(body, filename):
item["idx"] = idx
body.Data[idx] = item
template.render(body)
template.save("./results/%s.docx" % filename)
template.save("./results/%d.docx" % filename)

0 comments on commit 9af8764

Please sign in to comment.