updated README with cheerio

This commit is contained in:
Victor Nguyen 2013-03-18 22:40:43 +11:00
parent c1b9977bf8
commit c93c7f8777

View file

@ -5,14 +5,14 @@ Check it out at [specs-crepe.herokuapp.com](http://specs-crepe.herokuapp.com/)
## What is it? ## What is it?
This is a little Node app I wrote to eliminate a silly manual process we had to go through for a project rollout -- the porting of html tabular data into slightly different html table containing the same data. This is a little Node app I wrote to eliminate a silly manual process we had to go through for a project rollout -- the porting of html tabular data into a slightly different html table containing the same data.
But, really, it was just an excuse to try out a few things I've been wanting to try :D But, really, it was just an excuse to try out a few things I've been wanting to try :D
## How it works ## How it works
It's effectively a scraper. Built atop of a [Node][node] + [Express][express] foundation, it uses [Request][request] to... request the the source page containing the tabular data we want. We then parse the response inside a [jsdom][jsdom] environment to create a clean array of objects, which we pass to a [Jade][jade] template to produce our final html! It's effectively a scraper. Built atop of a [Node][node] + [Express][express] foundation, it uses [Request][request] to... request the the source page containing the tabular data we want. We then parse the response using [cheerio][cheerio] to create a clean array of objects, which we pass to a [Jade][jade] template to produce our final re-formatted html!
The frontend is used to get set various options to modify the output, particulary which model's specifications we want. You'll recognise the familiar [Bootstrap][bootstrap] stylings. The frontend is used to get set various options to modify the output, particulary which model's specifications we want. You'll recognise the familiar [Bootstrap][bootstrap] stylings.
@ -51,7 +51,7 @@ You should then be able to use the app by visiting localhost:3000
## What it uses ## What it uses
- [Node.js][node] - [Node.js][node]
- [Express][express] - [Express][express]
- [jsdom][jsdom] - [cheerio][cheerio]
- [Request][request] - [Request][request]
- [Jade][jade] - [Jade][jade]
- [Bootstrap][bootstrap] - [Bootstrap][bootstrap]
@ -59,7 +59,7 @@ You should then be able to use the app by visiting localhost:3000
[node]: http://nodejs.org/ [node]: http://nodejs.org/
[express]: http://expressjs.com/ [express]: http://expressjs.com/
[jsdom]: https://github.com/tmpvar/jsdom [cheerio]: https://github.com/MatthewMueller/cheerio
[request]: https://github.com/mikeal/request [request]: https://github.com/mikeal/request
[jade]: http://jade-lang.com/ [jade]: http://jade-lang.com/
[bootstrap]: http://twitter.github.com/bootstrap/ [bootstrap]: http://twitter.github.com/bootstrap/