1.1.4 • Published 10 years ago

parseiro v1.1.4

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

HTML Parser

Parse links on an HTML file, replacing variables with values.

======================

Example:

In this example, we will replace all variables with their respective values, set in the config.json.

<a href="#{first-link}">First link</a>

<a href="#{second-link}">Any other link</a>

<img src="#{highlight-image}" alt="This is my Awesome image!">

<p>#{cool-text}</p>

The config.json file for this example would look like this:

{
    "file_name": "index.html",
    "links": [
        { "first-link"      : "http://www.google.com" },
        { "second-link"     : "http://nodejs.org" },
        { "highlight-image" : "http://lorempixel.com/400/200/animals" },
        { "cool-text"       : "Lorem ipsum dolor sit amet, consectetur adipisicing elit." }
    ]
}

Don't forget to change the value of the "file_name" key!!

======================

Installation & Usage:

  1. Download the .zip file from github
  2. Extract it anywhere you want
  3. Copy the html file that you want to replace the variables into the root of the folder you have extracted it
  4. Configure the file_name and the links variable keys in the config.json
  5. Run the command node parse.js from your prompt/terminal
  6. That's it! Your parsed file will be placed at the output folder

======================

Requirements:

The only requirement is that you have node.js installed on your system.

======================

Contribute Please!!

Leave your comments, doubts, opinions! Thanks for using it!

Made with ♥ by Alessandro Dias.

1.1.4

10 years ago

1.1.3

10 years ago

1.1.2

10 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago