[nodejs] How to prepare a C10K demo

2013-05-04 Thread Afshin Mehrabani
Hello all, I want to prepare a C10K demo in NodeJs but I don't have any idea how. Could someone say how can I prepare a C10K demo in NodeJs HTTP Server (or maybe with expressjs) Thanks, Afshin -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/M

[nodejs] Re: Capturing a web page as an image on the server?

2013-05-04 Thread Alex Kocharin
I solved such task launching a separate X server and making a screenshot of a chromium running there. It's perfect in terms of accuracy, but might be just too heavy on resources. On Sunday, May 5, 2013 2:59:10 AM UTC, Mark Hahn wrote: > > I need to make thumbnails that represent web pages give

Re: [nodejs] Capturing a web page as an image on the server?

2013-05-04 Thread Mark Hahn
Thanks to both of you. I didn't realize phantomjs was so powerful. Calling it as a child process from node is no problem. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are

Re: [nodejs] Capturing a web page as an image on the server?

2013-05-04 Thread Arunoda Susiripala
PhantomJS is the option. But you have to install Phantom binary. It is not node. On Sunday, May 5, 2013, Felipe Mobus wrote: > Mark, > > PhantomJS's documentation[1] seems to suggest full-page capture should be > possible using the page.render() method. > > [1] https://github.com/ariya/phantomjs/

Re: [nodejs] Re: Capturing a web page as an image on the server?

2013-05-04 Thread Felipe Mobus
Mark, PhantomJS's documentation[1] seems to suggest full-page capture should be possible using the page.render() method. [1] https://github.com/ariya/phantomjs/wiki/Screen-Capture On Sun, May 5, 2013 at 12:10 AM, Mark Hahn wrote: > I forgot to mention that I looked at phantomjs. Am I wrong o

[nodejs] Re: Capturing a web page as an image on the server?

2013-05-04 Thread Mark Hahn
I forgot to mention that I looked at phantomjs. Am I wrong or is it only for rendering js code, not html? Nothing in the phantomjs samples shows rendering an actual complete web page. On Sat, May 4, 2013 at 7:59 PM, Mark Hahn wrote: > I need to make thumbnails that represent web pages given th

[nodejs] Capturing a web page as an image on the server?

2013-05-04 Thread Mark Hahn
I need to make thumbnails that represent web pages given the urls. I'd prefer to do it in a node environment. I wouldn't like to install lampp or some other environment for this one purpose. I know jsdom and cheerio but that only gets me to the dom. How do I render that to an image? Node alrea

RE: [nodejs] Re: What libraries are available to parse web pages?

2013-05-04 Thread Kevin Ar18
Sorry if that email came off really long.  I thought google needed the original message for context and would just filter it out when displaying it. [Technically, I think the format of the quote/original email caused problems.] -- -- Job Board: http://jobs.

RE: [nodejs] Re: What libraries are available to parse web pages?

2013-05-04 Thread Kevin Ar18
Thanks for the suggestions everyone. jsdom and cheerio look interesting -- and to think I passed over both of them. :) Anyways, I guess cheerio looks like it might be the better option due to the parser it uses. BTW, going a little bit off topic, I noticed that jsdom has a very nifty feature

[nodejs] [ANN] Kerouac - poetic static site generator

2013-05-04 Thread Jared Hanson
I've just published Kerouac, my take on how a static site generator should work: https://github.com/jaredhanson/kerouac It offers the most ridiculously easy way to transform Markdown (or Textile, etc.) into a complete website. Underneath the hood, its built on the same concept of middleware as

Re: [nodejs] api in npm for getting the number or list of dependent packages?

2013-05-04 Thread Gregg Caines
I'm actually looking for the opposite... the dependants, not the dependencies. For a given package x, it's the list of all the packages that depend on x. G On Sat, May 4, 2013 at 1:33 PM, Martin Cooper wrote: > The simplest way is to grab the package metadata from the registry with > this URL

Re: [nodejs] api in npm for getting the number or list of dependent packages?

2013-05-04 Thread Martin Cooper
The simplest way is to grab the package metadata from the registry with this URL: http://registry.npmjs.org//latest That will get you a JSON version of the same object you see with 'npm view ', at which point you can just pluck out the 'dependencies' object. -- Martin Cooper On Sat, May 4, 2

[nodejs] api in npm for getting the number or list of dependent packages?

2013-05-04 Thread Gregg Caines
Hey all, does anyone know if npm has an API (or couchdb view) for getting the list (or just the count) of dependent packages of a given package ? I suspect it does since npmjs.org has the info. I know there's an npm mailing list, but it mysteriously won't let me post. Thanks! G -- -- Job

Re: [nodejs] Re: What libraries are available to parse web pages?

2013-05-04 Thread Ilya Igonkin
I investigated this field some time ago and found these most commonly used solutions: cheerio, jsdom, phantom-proxy using phantomjs (in the ascending order of weigh/features). All of them can provide jQuery like interface for parsed data. On Sat, May 4, 2013 at 7:28 PM, Eldar wrote: > Perhaps

Re: [nodejs] Re: What libraries are available to parse web pages?

2013-05-04 Thread Matt
Another upvote for cheerio. It doesn't support all jQuery selectors, but it's a good enough subset. On Sat, May 4, 2013 at 11:56 AM, George Snelling wrote: > We started with jsdom and then switched to cheerio. Very happy with it. > > > On Friday, May 3, 2013 9:29:55 PM UTC-7, Kevin Ar18 wrote:

[nodejs] Re: What libraries are available to parse web pages?

2013-05-04 Thread George Snelling
We started with jsdom and then switched to cheerio. Very happy with it. On Friday, May 3, 2013 9:29:55 PM UTC-7, Kevin Ar18 wrote: > > Not sure if this is an appropriate question to ask here, but I could not > find any other major node.js communities to ask on. > > > My goal is to extract data

Re: [nodejs] Our Contribution To Node Community, Introducing NodeJS Console

2013-05-04 Thread Jorge
On 03/05/2013, at 17:31, Kushal Likhi wrote: > Hi, > > As we are very much thrilled and in love with Node, hence we took out some > time to build something for the NodeJS community. We are proud to announce > the NodeJS Console. Its 100% non commercial and for Node Community. > • The

[nodejs] Re: What libraries are available to parse web pages?

2013-05-04 Thread mscdex
On May 4, 12:29 am, Kevin Ar18 wrote: > 1) Does anyone else have experience with using node.js in the way I just > described to extract various pieces of data from a site?  If so,  what > libraries do you recommend -- which do you use and which alternatives (that > you don't use) have you also

[nodejs] An option about command line tools

2013-05-04 Thread 题叶
*I think Bash-like command line tools do have limitations*, and that's why there is grunt. As I write CoffeeScript, I know exactly how convenient it is to write configs on a script and call it by command. So I think command line tools are better used in triggering programes, instead of writing t

[nodejs] Re: What libraries are available to parse web pages?

2013-05-04 Thread Eldar
Perhaps the best option for now is jsdom . It can't handle all pages in the web but it's quite forgiving. I used this lib for the same purposes half an year ago and found experience somewhat buggy but it worked. -- -- Job Board: http://jobs.nodejs.org/ Posting

[nodejs] What libraries are available to parse web pages?

2013-05-04 Thread Kevin Ar18
Not sure if this is an appropriate question to ask here, but I could not find any other major node.js communities to ask on. My goal is to extract data from pages on the internet. Basically, I need to parse html pages (which might have errors, be malformed, etc...), turn the page into a usable

[nodejs] Re: [ANN] Paroles 0.1.67. Paroles are Promises with Steps, in Callback disguise.

2013-05-04 Thread Jean Hugues Robert
@mgutz, https://github.com/gameclosure/ff ff and paroles do have similar purposes, thanks for pointing that. I missed ff but I too had a look at the reimagined "step" by creationix/Time Caswell. I believe the main difference between ff and paroles is about the way ff handle step errors because

[nodejs] Re: [ANN] Paroles 0.1.67. Paroles are Promises with Steps, in Callback disguise.

2013-05-04 Thread mgutz
Just in case you did'nt know, there's a library like this already gameclosure/ff On Friday, May 3, 2013 5:09:17 PM UTC-7, Jean Hugues Robert wrote: > > Hi, > > Those interested in the current tension about Callbacks vs Promises may > want to have a look a some code I wrote to help solve this