magxTz / htmlGenerator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

htmlGenerator

a simple python program that convert a 3 quoted string into html codes, suppose you want to send an email(HTML formated email specifically) from your python script then this piece of shit is there for you,

how to format your string(triple quotes string)

in order to use this, the input string must be a multiline string(a triple quote string), the context is detemined by the intents

tags

each tag ends with colon (:) forexample head: ,body: ,p: ,img: ,div: ,input: ,button: ,h1: , h2: ,h3: ,h4: ,h5: etc

attributes

equal sign (=) placed between attribute and its value example color=red background-coloor=white border-radius=10px text-align=center

Example

CHEESE!
also, if you wanna include variables in your ht_string you can just use f string and add {variable_name} where you want it to be.
eg
CHEESE!

finally


you can write your string in the same python file or in separate file and then import to your main py file
**but it looks clean when you import it** 😇

CHEESE!

About


Languages

Language:Python 100.0%