Skip to content

rudychung/SiteGenerationTool

 
 

Repository files navigation

SiteGenerationTool

Author: Stefan Frunza

Requirements

To work with this program, Python is all you require

Warning

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.

What it is

A tool that will take a text (.txt) or markdown (.md) 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. When a directory is specified as input the program will also attempt to create an index.html with anchor tags to all of the HTML files generated based on the input directory's contents.

Possile Options:

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 directory or file only .txt suffix will be correctly parsed (requires argument)
-o --ouput Specify a name for existing directory (optional argument)

Markdown Support:

Type Or Result
*Italic* _Italic_ Italic
**Bold** __Bold__ Bold

About

A tool that will take a text file as an option and create HTML markup based upon it.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.4%
  • CSS 2.6%