This script converts plain text into HTML, wrapping each line in <p> tags, lines starting with a number and a dot in <li> tags, and the first line in a <h1> tag.
-
Enter your plain text into the
article1.txtfile. -
Open your terminal and navigate to the directory containing the script.
-
Run the script with the following command:
python3 text_to_html.py -
The formatted result can be found in
destination.html.