The following is a Markdown to HTML converter. It first parses the markdown file using a variety of regex expressions and converts it into a series of Elements in a treelike structure. From there the HTMLFactory recursively converts that element tree into a series of HTML expressions, and saves the result to the disk.
- Make sure you have Python 3.9+ installed and
pip
installed. - Run
pip install pipenv
. - Run
pipenv install
followed bypipenv shell
. - Run the runner file by
python3 runner.py --input_filepath "MARKDOWN_FILE" --output_filepath "HTML_OUTPUT_FILE"
, replacing MARKDOWN_FILE and HTML_OUTPUT_FILE with the correct filepaths. - This this should generate a HTML file in the directory specified by HTML_OUTPUT_FILE.
- Follow steps 1-3 above, setting up the pipenv environement.
- Run
python3 -m unittest tests.test_markdown_interpreter