Wednesday 15 September 2021

Built a Command Line Tool to turn txt to html in Node.js

Intro

 For our first two weeks in OSD600 we had to build a command line tool to generate html given text files.  The requirements are as follows:

1. Options -h and -v flag are used to display help and version of the program

2. Mandatory -i specify file input or file folder - I implemented the option to recursively go through the folder as well as nested folders

3. Generate properly ,html files, where I always have a main index.html file plus zero or more *.html files

4. The generated html files are placed in the dist folder

5. Make a user friendly interface

Usage

1. clone the repository with git clone or download the .zip then unzip

2. Install node version 16 on your machine

3. Go to your folder

4. Run npm install -g .

5. for the command line tool run sggy -i <name of file or folder>

Example

Output


files and folders created


index.html


Sample test2.html

Repo


License






No comments:

Post a Comment

What I learned from Project 1 of Udacity's Data Science with Python bootcamp

Introduction As part of the project I completed successfully, I used SQL to explore a database related to movie rentals. SQL queries was ran...