A command-line static site generator to generate a complete HTML website from raw data and files (txt files or MarkDown files).
- Name: TextHTMLPress
- Github Repo
- MIT License
- README.md
- requirements.txt
- title of .html file
- customized output destination
- CSS stylesheet
- customized option from config file
This tool is written by Python 3.9
, with pip 21.1.2
.
Check the requirements.txt
.
- Download the code (the TextHTMLPress folder)
- Using a command line tool (CLI) such as
Windows cmd
,git bash
,Unix shell
orMaxOS Terminal
. - In the CLI:
# install requirements
pip install -r requirements.txt
# redirect into the package folder
cd ~/yourpath/TextHTMLPress
# check help
# it might be python3 __main__.py --help on your machine
# python3 instead of python
python __main__.py --help
# generate .html from a .txt file
python __main__.py -i ./tests/inputs/Silver\ Blaze.txt
# generate .html files from a folder
python __main__.py -i ./tests/inputs/
# use multiple options
python __main__.py -i ./tests/inputs/Silver\ Blaze.txt -s https://cdn.jsdelivr.net/npm/water.css@2/out/water.css
# use config file
# or python __main__.py -c config.yml
#
python __main__.py --config config.yml
# specify the lang attribute in root element of HTML, default en-CA
python __main__.py -i ./tests/inputs/ -l fr
Please find here.