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")
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")
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")
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)
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)
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", )
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/")
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/")
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/")
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)
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/")
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)
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)
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/")