I have a released my first open source app, a command-line tool written in Python which converts .txt file(s) to .html. This is my first step to creating a full-fledged static site generator!
In my first release v0.0.1, the tool is capable of:
- converting TIL posts written in a .txt file or a folder of .txt files to .html
- specifying the output folder
- specifying the url of a css stylesheet
Installation
Download and install the latest version of python
Open a terminal and navigate to where you want go-go-web to be stored. Clone this repository locally
git clone https://github.com/kliu57/go-go-web.git
cd go-go-web
- Check that you have the latest version of the app.
python convert.py --version
Usage
Convert .txt to .html
python convert.py -i <file or folder path>
# Example (Convert one file)
python convert.py -i ./examples/til_post1.txt
# Example (Convert a folder of files)
python convert.py -i ./examples
- Output(s) can be found in til folder
Specify Output Location
python convert.py -i <file or folder path> -o <folder path>
# Example
python convert.py -i ./examples/examples.txt -o ./examples
Specify Stylesheet
python convert.py -i <file or folder path> -s <stylesheet url>
# Example
python convert.py -i ./examples/til_post2.txt -s https://cdnjs.cloudflare.com/ajax/libs/tufte-css/1.8.0/tufte.min.css
View App Version
python convert.py --version` or `python convert.py -v
View Usage Message
python convert.py --help` or `python convert.py -h
Top comments (0)