Beispiel #1
0
def create_result_md_var(force_creation=False):
    test_general.create_result_trans_file_inside(
        instruction.search_include_vars_to_md_file,
        "_MdVar.md",
        folder_search=test_general.get_test_folder() + "/md_var/",
        force_creation=force_creation,
        filename_ext=".md")
Beispiel #2
0
def create_result_include_file(force_creation=False):
    test_general.create_result_trans_file_inside(
        instruction.include_files_to_md_file,
        "_IncludeFile.md",
        folder_search=test_general.get_test_folder() + "/include_file/",
        force_creation=force_creation,
        filename_ext=".md")
Beispiel #3
0
def create_result_md_include(force_creation=False):
    test_general.create_result_trans_file_inside(
        instruction.search_include_refs_to_md_file,
        "_MdInclude.md",
        folder_search=test_general.get_test_folder() + "/md_include/level1/",
        force_creation=force_creation,
        filename_ext=".tmd")
Beispiel #4
0
def create_search_link_in_md_text(force_creation=False):
    test_general.create_result_transform_text(
        mdcommon.search_link_in_md_text_json,
        "_LinkInMdText.json",
        filename_ext=".md",
        folder_search=test_general.get_test_folder() + "/SearchLinks/",
        force_creation=force_creation)
Beispiel #5
0
def test_md():
    filename = test_general.get_test_folder() \
        + "/translate/DS004-boucher.fr.md"
    filename_res1 = filename + ".res1.md"
    filename_res2 = filename + ".res2.md"

    md1 = mdfile.MarkdownContent(filename)
    if not os.path.isfile(filename_res1):
        result1 = translate.translate_md(md1.content, src="fr", dest="en")
        common.set_file_content(filename_res1, result1)
Beispiel #6
0
def test_manip_pdf():
    folder_search = test_general.get_test_folder() + "/pdf_manip/"
    md_filename = os.path.join(folder_search, "test.md")
    html_filename = mdtopdf.convert_md_to_html(md_filename)
    pdf_filename = mdtopdf.convert_md_to_pdf(
        md_filename,
        path=folder_search,
        background_pdf="background_other_page_ge.pdf",
        background_first_page_pdf="background_first_page_ge.pdf",
    )
Beispiel #7
0
def find_md_include_test():
    return test_general.find_test_file_couple(
        "_MdInclude.md", filename_ext=".tmd",
        folder_search=test_general.get_test_folder() + "/md_include/")
Beispiel #8
0
def find_md_var_test():
    return test_general.find_test_file_couple(
        "_MdVar.md", filename_ext=".md",
        folder_search=test_general.get_test_folder() + "/md_var/")
Beispiel #9
0
def find_search_link_in_md_t_test():
    return test_general.find_test_file_couple(
        "_LinkInMdText.json",
        filename_ext=".md",
        folder_search=test_general.get_test_folder() + "/search_links/")
Beispiel #10
0
def create_result_convert_to_pdf(force_creation=False):
    test_general.create_result_transform_file(
        mdtopdf.convert_md_to_pdf,
        ".pdf",
        folder_search=test_general.get_test_folder() + "/convert_to_pdf/",
        force_creation=force_creation)
Beispiel #11
0
def find_convert_to_pdf_test():
    return test_general.find_test_file_couple(
        ".pdf",
        filename_ext=".md",
        folder_search=test_general.get_test_folder() + "/convert_to_pdf/")
Beispiel #12
0
def create_result_md_correct(force_creation=False):
    test_general.create_result_transform_text(
        normalize.correct_markdown_text,
        "_MdCorrect.md",
        folder_search=test_general.get_test_folder() + "/md_correct/",
        force_creation=force_creation)
Beispiel #13
0
def create_result_md_beautifier(force_creation=False):
    test_general.create_result_transform_text(
        normalize.md_beautifier,
        "_MdBeautifier.md",
        folder_search=test_general.get_test_folder() + "/md_beautifier/",
        force_creation=force_creation)
Beispiel #14
0
def find_md_correct_test():
    return test_general.find_test_file_couple(
        "_MdCorrect.md",
        filename_ext=".md",
        folder_search=test_general.get_test_folder() + "/md_correct/")