From doark at mail.com Tue Aug 9 15:21:29 2016 From: doark at mail.com (David Niklas) Date: Tue, 9 Aug 2016 11:21:29 -0400 Subject: [Surfraw-devel] How to use surfraw with curl Message-ID: <20160809112129.5c4ca226@ulgy_thing> Hello, I entered this (as a test): % sr -browser="curl -L " -s duckduckgo trump And got this: 301 Moved Permanently

301 Moved Permanently


nginx
Now, I expected to get results as an html page to stdout. What do I do? I tried increasing curl verbosity curl -vLD - to no avail. Thanks, David From kyle at imap.cc Thu Aug 11 00:47:36 2016 From: kyle at imap.cc (Kyle Isom) Date: Wed, 10 Aug 2016 17:47:36 -0700 Subject: [Surfraw-devel] How to use surfraw with curl In-Reply-To: <20160809112129.5c4ca226@ulgy_thing> References: <20160809112129.5c4ca226@ulgy_thing> Message-ID: <20160811004736.GA17753@straka> Hello David, I did some tests, and it looks like the args aren't being passed. I created a curl wrapper printf '#!/bin/sh\n\ncurl -vL "$@"' | tee $HOME/bin/vcurl chmod +x $_ sr -browser vcurl -s duckduckgo trump and I was able to get the actual HTML. Cheers, Kyle On 16/08/09 at 11:21, David Niklas wrote: > Hello, > I entered this (as a test): > % sr -browser="curl -L " -s duckduckgo trump > > And got this: > > 301 Moved Permanently > >

301 Moved Permanently

>
nginx
> > > > Now, I expected to get results as an html page > to stdout. > What do I do? > I tried increasing curl verbosity curl -vLD - > to no avail. > > Thanks, > David > > _______________________________________________ > Surfraw-devel mailing list > Surfraw-devel at lists.alioth.debian.org > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/surfraw-devel -- Cheers, Kyle kyle at imap.cc -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: From rowan at rowanthorpe.com Wed Aug 10 13:00:29 2016 From: rowan at rowanthorpe.com (Rowan Thorpe) Date: Wed, 10 Aug 2016 16:00:29 +0300 Subject: [Surfraw-devel] How to use surfraw with curl Message-ID: (am replying to the digest mailing-list through webmail, this probably won't thread properly with the message it is replying too..) On 9 August 2016 at 11:21:29, David Niklas wrote: > Hello, > I entered this (as a test): > % sr -browser="curl -L " -s duckduckgo trump > ---8<--- > Now, I expected to get results as an html page > to stdout. > What do I do? After a few quick experiments with things like -browser="echo x", -browser="printf 'x%sx'", etc I can see that the commandline parser in sr obviously just takes the first non-whitespace characters given to -browser and discards the rest, so your use of -browser="curl -L" was seen as -browser=curl (hence how it didn't follow the redirect which the -L would have caused if it was present in the final invocation, and how adding verbose flags made no difference). The easiest workaround is to create a small shell wrapper-script with the desired flags, and call that from sr. -- Rowan Thorpe http://twitter.com/rowanthorpe http://www.rowanthorpe.com PGP fingerprint: BB0A 0787 C0EE BDD8 7F97 3D30 49F2 13A5 265D CCBD ---- "A riot is the language of the unheard." - Dr. Martin Luther King "There is a great difference between worry and concern. A worried person sees a problem, and a concerned person solves a problem." - Harold Stephens "Ignorance requires no apologies when it presents questions rather than assertions." - Michael Sierchio (OpenSSL mailing list) "What we need more than an end to wars is an end to the beginning of all wars." - Franklin Roosevelt From doark at mail.com Thu Aug 11 21:13:21 2016 From: doark at mail.com (David Niklas) Date: Thu, 11 Aug 2016 17:13:21 -0400 Subject: [Surfraw-devel] How to use surfraw with curl In-Reply-To: <20160811004736.GA17753@straka> References: <20160809112129.5c4ca226@ulgy_thing> <20160811004736.GA17753@straka> Message-ID: <20160811171321.1400a628@ulgy_thing> On Wed, 10 Aug 2016 17:47:36 -0700 Kyle Isom wrote: This works for me with two exceptions. BTW: sr 2.2.9-r1 1. PATH (in fact the entire env), is not considered by the sr program so I had to use an absolute path. 2. The equals sign HAD to be there. It seems that sr is REALLY picky about it's arguments. Thanks, David > Hello David, > > I did some tests, and it looks like the args aren't being passed. I > created a curl wrapper > > printf '#!/bin/sh\n\ncurl -vL "$@"' | tee $HOME/bin/vcurl > chmod +x $_ > sr -browser vcurl -s duckduckgo trump > > and I was able to get the actual HTML. > > Cheers, > Kyle > > > On 16/08/09 at 11:21, David Niklas wrote: > > Hello, > > I entered this (as a test): > > % sr -browser="curl -L " -s duckduckgo trump > > > > And got this: > > > > 301 Moved Permanently > > > >

301 Moved Permanently

> >
nginx
> > > > > > > > Now, I expected to get results as an html page > > to stdout. > > What do I do? > > I tried increasing curl verbosity curl -vLD - > > to no avail. > > > > Thanks, > > David > > From ng0 at we.make.ritual.n0.is Sun Aug 14 09:47:19 2016 From: ng0 at we.make.ritual.n0.is (ng0) Date: Sun, 14 Aug 2016 09:47:19 +0000 Subject: [Surfraw-devel] New release? Message-ID: <87fuq7r8bc.fsf@we.make.ritual.n0.is> Hi, I'm about to package surfraw for GNU Guix, and I was wondering if there were enough changes for a new release? The last one was back in december 2013. Second question: I changed the contributor name before, I'd like to have to "synced" with what's used elsewhere. Take this commit as a proof that the name applies to who I am: https://git.savannah.gnu.org/cgit/guix.git/commit/?id=679b535b03ff2c9408ebfaa3baae70736c8455ec There are personal reasons for the change(s). Further contributions will be made under this (ng0) name. There might've been additions to the search of searx in recent version updates of searx, I will check once I've build surfraw on Guix and send in changes. Further elvis are work in progress (gentoo wiki etc). Patch for the authors name update appended. -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Updated-searx-author-details.patch Type: text/x-patch Size: 1018 bytes Desc: not available URL: -------------- next part -------------- -- ?? ng0 For non-prism friendly talk find me on http://www.psyced.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 800 bytes Desc: not available URL: