(self)
| 829 | pass |
| 830 | |
| 831 | def on_finish(self) -> None: |
| 832 | last_xml = self.memory_xml.last_xml |
| 833 | assert last_xml is not None |
| 834 | out_path = os.path.join(self.output_dir, "index.txt") |
| 835 | transformed_txt = bytes(self.xslt_txt(last_xml)) |
| 836 | with open(out_path, "wb") as out_file: |
| 837 | out_file.write(transformed_txt) |
| 838 | print("Generated TXT report (via XSLT):", os.path.abspath(out_path)) |
| 839 | |
| 840 | |
| 841 | register_reporter("xslt-txt", XsltTxtReporter, needs_lxml=True) |