DSP909 - Static stite generator whichcoverts the.txt file to static .html page. In this version of project we need to create the command line tool which will help to process the .txt file to .html files
In this release version user can do the following
- User can use the command line tool to specify the particular .txt file to convert it into .html file type.
- User can specify the folder which contains multiple .txt files to convert all of them into a separate .html file type.
- This tool is built using the Node.js
- Clone the repository into your local drive
git clone <repository url> <project_name>
- Install all the dependencies
cd <project_name>
npm install
- Run the npm link module
npm link
- Build and run the project
node app.js - command line arguments
For example
node app.js - i "test.txt" .
if the file is in particular folder we have to provide the path like this node app.js -i "./textfile/Silver Blaze.txt"
if you want to convert the whole folder text file to html use this commnad node app.js -i textfile
Command line option available for User in this tool
Option | Detailed Inforamtion |
---|---|
-v, --version | Print the tool's name and current version |
-i, --input file | Allow users to specify the file |
-h, --help | Prints information about usage of tool |
##.txt file for testing Folder in directory named textFile contains all the text file which i have used to test my code. One extra file is available in the main directory named "test.txt".
Command type | Description |
---|---|
node app.js -i <.txt file> |
Create single .html file |
node app.js -i <folder> |
Create all the .txt file to .html which are available in the folder |
In addition to the above feature i have implemented these feature in my site.
-
Improve the look and feel of your generated HTML pages using a default stylesheet that you design.
-
if the user specifies a folder for the input, automatically generate an index.html file, which has relative links to each of the generated HTML files.