The first assignment required us to create a static site generator. I choose Python to write a simple Static Site Generator tool named Magic-SSG is, and it can help user to generate .html from . txt files.
Features
So far, this tool has the following functions:
- Allows the user to specify an input file or folder to open a .txt file and generate a .html file.
- Automatically identify titles and content.
- Specify a different output directory using --output or -o.
- Allow the input to be a deep tree of files and folders.
- Allow user to check the tool's version.
Installation
Make sure you have installed Python version 3.8.5 or above.
How to use
-
Generate a .html file from a file or folder:
python magic_ssg.py -i/--input <file name or folder name>
-
Specify a different output directory using --output or -o.
python magic_ssg.py --input --output
-
Check the tool's version
python magic_ssg.py –v/--version
-
Display how to use the tool
python magic_ssg.py –h
Example
Links
Link to my github repo from here
Top comments (0)