sinjax / jsgrep

Using JQuery perform CSS queries on websites from the command line
8 stars 1 forks source link

First example not working #1

Closed timp21337 closed 13 years ago

timp21337 commented 13 years ago

works: curl -s sinjax.net | jsgrep -s img -a src -nt | sort | uniq not works: curl -s http://it.wikipedia.org/wiki/File:Trento-panorama_Povo.jpg | jsgrep -s "a[href*=geo]" -nt

I am using Ubuntu and had a little difficulty setting up jsgrep, so maybe I have something wrong.

sinjax commented 13 years ago

How exciting! My first bug report. I'll have a look first thing tomorrow morning

Cheers

On 18 Aug 2011, at 20:01, timp21337 reply@reply.github.com wrote:

works: curl -s sinjax.net | jsgrep -s img -a src -nt | sort | uniq not works: curl -s http://it.wikipedia.org/wiki/File:Trento-panorama_Povo.jpg | jsgrep -s "a[href*=geo]" -nt

I am using Ubuntu and had a little difficulty setting up jsgrep, so maybe I have something wrong.

Reply to this email directly or view it on GitHub: https://github.com/sinjax/jsgrep/issues/1

sinjax commented 13 years ago

yep! reproduced the issue. A fresh install of jsgrep and I have the problem. I also tried my examples on a previously installed version of jsgrep but that seemed to work. it would SEEM that the problem is with a new installs. investigating.

sinjax commented 13 years ago

right fixed it in the head now

but. in honesty quite badly :-). What I realise i've done here is use parts of jsdom incorrectly. there must be a better solution.

must fix this at some point. :-)

timp21337 commented 13 years ago

Wow! That is turn around.

sinjax commented 13 years ago

heh yeah :-) So I fixed it in a better way now, the program has been greatly simplified by using the jquery npm module. should work fine now.

Cheers!

timp21337 commented 13 years ago

Oh yes:

$ npm update $ alias jsgrep='node ~/local/npm/nodemodules/jsgrep/src/jsgrep' curl -s http://en.wikipedia.org/wiki/Markdown | jsgrep -s ".toclevel-1>a>.toctext" -nt -r | sed 's/ //g' Syntax_examples Markdown_users See_also References External_links

Great work. Cheers!