12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- import config
- import cognos11
- from pdf import pdf_merge, pdf_test
- import plac
- from enum import Enum
- class ExportFormat(Enum):
- PDF = "PDF"
- XML = "XML"
- class C11:
- commands = ["export", "reportoutput", "errors", "create", "mailtemplate"]
- def __init__(self):
- self.cfg = config.Config()
- def export(self, folder="", format="XML"):
- exp = cognos11.c11_export(self.cfg)
- exp.export_folder(folder, format)
- def reportoutput(self, folder=""):
- exp = cognos11.c11_export(self.cfg)
- folder2 = exp.get_folder(folder)
- exp.export_folder(folder, "PDF")
- pdf_test.missing_data(self.cfg.cognos11.reportoutput_dir + "/" + folder)
- pdf_merge.merge_reports_in_folder(self.cfg, folder2)
- def errors(self):
- exp = cognos11.c11_export(self.cfg)
- exp.export_errors()
- def create(self, path: str):
- cognos11.c11_create(self.cfg).create_path(path)
- def mailtemplate(self):
- exp = cognos11.c11_export(self.cfg)
- exp.mail_template("")
- if __name__ == "__main__":
- plac.Interpreter.call(C11)
|