npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

agandhi29_static_site_geneator

v1.0.0

Published

DSP909 - Static site generator which converts 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

Downloads

1

Readme

Static site Generator (ag-ssg)

DSP909 - Static site generator which converts 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

Outline

In this release version user can do the following

  1. User can use the command line tool to specify the particular .txt file to convert it into .html file type.
  2. User can specify the folder which contains multiple .txt files to convert all of them into a separate .html file type.
  • 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 command node app.js -i textfile

Command line options

Command line option available for User in this tool

| Option | Detailed Information | | --------------------- | ----------------------------------------- | | -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 | | -c, --config file | Allow user to use tool with config |

##.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". Another extra file is called "config.json" and can be used to test --config command

Running the Tool with different commands

| 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 | | node app.js -config <.json file | Create all the .txt file to .html which are available in the file or folder which specified in the config |

Optional Feature

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.

Markdown Support

  • Initial support for the parsing of .md files has been added and the tool will now appropriately handle the # header1 and ## header2 syntax features when a .md file is used for data input.
  • Add support for a horizontal rule in Markdown. The Markdown --- should get converted to an <hr> tag.

Language Support

  • Add an option -l,-- lang flag, which indicates the language to use when generating the lang attribute on the root html element.
  • For example --lang fr means the new generated documents will be in French.
  • To use this feature in this app you can use this command node app.js -l fr -i "./textfile". With this you can create the new html file in French

Configuration Support

  • Use option -c, --config <config-file> flat, which indicates that the config functionality will be user.
  • Config Supports following fields:
    • output - the output folder (./dist by default)
    • input - the input folder/file (./test.md by default)
    • lang - the specified language (en-CA by default)
  • To use this feature in the app you can use this command node app.js --config config.json