diff --git a/py-scripts/lf_report.py b/py-scripts/lf_report.py index 04d2ae8a..ab65b9ea 100755 --- a/py-scripts/lf_report.py +++ b/py-scripts/lf_report.py @@ -84,6 +84,7 @@ class lf_report(): self.csv_file_name="" self.html = "" self.custom_html = "" + self.pdf_link_html = "" self.objective = _obj self.obj_title = _obj_title #self.systeminfopath = "" @@ -286,6 +287,15 @@ class lf_report(): self.write_output_pdf = "{}/{}-{}".format(self.path_date_time,self.date,self.output_pdf) pdfkit.from_file(self.write_output_html, self.write_output_pdf, options=options) + def build_pdf_link(self): + pdf_link_path = "{}/{}-{}".format(self.path_date_time,self.date,self.output_pdf) + self.pdf_link_html = """ + + PDF_Report + """.format(pdf_link_path=pdf_link_path) + self.html += self.pdf_link_html + + def generate_report(self): self.write_html() self.write_pdf() diff --git a/py-scripts/sandbox/lf_qa.py b/py-scripts/sandbox/lf_qa.py index 0efb1590..dde155f5 100755 --- a/py-scripts/sandbox/lf_qa.py +++ b/py-scripts/sandbox/lf_qa.py @@ -336,6 +336,7 @@ Example: kpi_csv_sq.py --store --png --show --path (read report.start_content_div2() report.set_obj_html("Objective", "QA Verification") report.build_objective() + report.build_pdf_link() report.set_table_title("QA Test Results") report.build_table_title() # report.set_text("lanforge-scripts git sha: {}".format(git_sha))