Author: Stefan Frunza
THIS PROGRAM DELETES THE TARGET DIRECTORY SPECIFIED WITH THE -o OPTION. it then recreates it and populates it with the new HTML, but remember THIS PROGRAM DELETES THE TARGET DIRECTORY SPECIFIED WITH THE -o OPTION.
A tool that will take a text file as an option and create HTML markup based upon it.
To use simply open a console to the script's location and write python Sitegen.py along with the options you wish to specify, among which you must have a plain text file to convert to mark up.
Optionally, if you leave 2 empty lines below the first line in the .txt file the program will make the first line of your text file the title of the HTML page that will be generated along with having it be bolded as an H1 at the top of the page.
The tool will automatically create a ./dist directory and insert the created HTML there. Everytime the program runs it will delete the target ./dist directory and recreate it.
A user may specify an input directory instead of an input file and the program will go through every file within the directory and attempt to convert .txt to .html while ignoring further directories.
ShortCut | LongOption | Result |
---|---|---|
-v | --version | Displays name and version of program |
-h | --help | Displays a help message with useful information about program and possible options |
-i | --input | Specify an Input file please add .txt suffix (requires argument) |
-o | --ouput | Specify a name for existing output directory (requires argument, must be existing directory) |