Esempio n. 1
0
def top35_run_p_reports(master: Master, **kwargs) -> None:
    group = get_group(master, str(master.current_quarter), kwargs)
    for p in group:
        p_name = master.project_information[p]["Abbreviations"]
        print("Compiling summary for " + p_name)
        report_doc = open_word_doc(top35_root_path / "input/summary_temp.docx")
        output = compile_p_report(report_doc, master, p, **kwargs)
        output.save(top35_root_path /
                    "output/{}_report.docx".format(p_name))  # add quarter here
Esempio n. 2
0
def ar_run_p_reports(data: dict, project_info: dict) -> None:
    report_doc = open_word_doc(root_path / "input/summary_temp.docx")

    for i, p in enumerate(data.projects):
        if i != 0:
            report_doc.add_section(WD_SECTION_START.NEW_PAGE)  # new page
        # print("Compiling summary for " + p)
        # qrt = make_file_friendly(str(master.ma.quarter))
        output = ar_compile_p_report(data, report_doc,
                                     get_project_information(), p)
        # abb = project_info[p]["Abbreviations"]
    output.save(root_path / "output/annual_report_summaries.docx")
Esempio n. 3
0
def cdg_run_p_reports(master: Master, **kwargs) -> None:
    group = master.current_projects
    # group = get_group(master, str(master.current_quarter), kwargs)

    for p in group:
        print("Compiling summary for " + p)
        report_doc = open_word_doc(cdg_root_path / "input/summary_temp.docx")
        qrt = make_file_friendly(str(master.master_data[0].quarter))
        output = cdg_compile_p_report(report_doc,
                                      cdg_get_project_information(), master, p)
        abb = master.abbreviations[p]["abb"]
        output.save(
            cdg_root_path /
            "output/{}_report_{}.docx".format(abb, qrt))  # add quarter here
Esempio n. 4
0
def word_doc_landscape():
    wd_path = os.path.join(os.getcwd(),
                           "resources/summary_temp_landscape.docx")
    doc = open_word_doc(wd_path)
    return doc