import argparse from pathlib import Path import mistletoe # ファイルの読み込み def read_file(file_path:str) -> str: with open(file_path, "r", encoding="utf-8") as input_file: return input_file.read() # ファイルへ書き出し def write_file(file_path:str, html_str:str) -> None: with open(file_path, "w", encoding="utf-8") as output_file: output_file.write(html_str) # body タグの中身に変換する def get_body(md_str:str) -> dict: mark
![Python で Markdown を Html に変換する(基本編)](https://cdn-ak-scissors.b.st-hatena.com/image/square/19e4222da7359552114343d202ec0e6efe3c349a/height=288;version=1;width=512/https%3A%2F%2Fres.cloudinary.com%2Fzenn%2Fimage%2Fupload%2Fs--8f0TLJ-i--%2Fc_fit%252Cg_north_west%252Cl_text%3Anotosansjp-medium.otf_55%3APython%252520%2525E3%252581%2525A7%252520Markdown%252520%2525E3%252582%252592%252520Html%252520%2525E3%252581%2525AB%2525E5%2525A4%252589%2525E6%25258F%25259B%2525E3%252581%252599%2525E3%252582%25258B%2525EF%2525BC%252588%2525E5%25259F%2525BA%2525E6%25259C%2525AC%2525E7%2525B7%2525A8%2525EF%2525BC%252589%252Cw_1010%252Cx_90%252Cy_100%2Fg_south_west%252Cl_text%3Anotosansjp-medium.otf_37%3AAWtnb%252Cx_203%252Cy_121%2Fg_south_west%252Ch_90%252Cl_fetch%3AaHR0cHM6Ly9zdG9yYWdlLmdvb2dsZWFwaXMuY29tL3plbm4tdXNlci11cGxvYWQvYXZhdGFyL2E2MTdhZTAxZjQuanBlZw%3D%3D%252Cr_max%252Cw_90%252Cx_87%252Cy_95%2Fv1627283836%2Fdefault%2Fog-base-w1200-v2.png)