You'll need to have Python3 installed on your PC if you want to test out this code.
First of all you will need to create a folder with the .py extension. Example "htmlcssjsgen.py".
Line 1 and 2 imports sys and os inbuilt module. We use os on line 6 to get path, current working directory, etc.
This obviously writes html sample code into the index.html file previously created.
line 52, 53 and 54 closes out those files that we just wrote into.
Save and run. Youll run it this way "python3 .py ".
I saved my script as "scafoldHTMLCSSJS.py" and ran "python3 scafoldHTMLCSSJS.py myproject".
"myproject" is gotten from sys.argv.
The result will be:
This script should help you in times when you want to quickly create a HTML, CSS and JS project automatically.