grep for craigslist?

Joshua Judson Rosen rozzin at geekspace.com
Thu Feb 14 13:23:46 EST 2013


You should turn craigsearch into a web service.

I have a bunch of 50%-off coupons for new domains-registrations at
gandi.net, if you want. Looks like "craigsearch.com" is already taken,
though, so you'll have to pick another name....

David Rysdam <david at rysdam.org> writes:
>
> I liked, but didn't LIKE like, that solution
[...]
> Which means that I can now fix that error AND announce the first
> release of craigsearch!
>
> You can't use regular expressions and it would be hard to fix
> that. You'd basically have to download all of CL and search it
> locally. Instead, I'm searching for a term at a time using the above
> URL-based query scheme and then parsing the results. Fortunately, they
> seem to be very easily parseable (for now).
>
> The usage is either
>
>     craigsearch <term>
>
> where <term> can be multiple words searched for together (i.e. "milling
> machine" returns hits where both "milling" and "machine" appear) or
>
>     craigsearch -f <file-of-terms>
>
> similar to how grep -f works.
>
> This is only part of the solution, of course. The next step is to save
> the output from one run and diff it against the output on another run,
> notifying me of new things. That's pretty trivial[1].
>
> [1] Except for the diff itself. The man page seems to indicate that you
> can get the "one-sided" differences by using some kind of format thing,
> but my diff won't take any of the options the man page gives for that
> and it's so confusingly written I can't even tell what is *supposed* to
> work. I eventually resorted to just
>
>     diff A B | grep \>
>
> Am I missing something obvious or is diff just broken? The man page sure
> isn't helpful.
>
>
>
> _______________________________________________
> gnhlug-discuss mailing list
> gnhlug-discuss at mail.gnhlug.org
> http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/

-- 
"Don't be afraid to ask (λf.((λx.xx) (λr.f(rr))))."



More information about the gnhlug-discuss mailing list