OPENSEA...GENQUERY(1)
π OPENSEARCH-GENQUERY π
okay bestie, listen up β this is opensearch-genquery, one of the little Perl tools from the User Contributed Perl Documentation collection. She's a command-line girlie who takes an OpenSearch Description file and spits out the URL of a query. That's the whole vibe. π
β¨ NAME β¨
opensearch-genquery β outputs the URL of a query generated from an OpenSearch Description. literally that's her whole job and she does it flawlessly. π
πΈ SYNOPSIS πΈ
opensearch-genquery [-q] [-H] [-A] [-R] [-c COUNT] [-i INDEX]
[-p PAGENUM] [-l LANG] [-O ENC] [-I ENC] URL SEARCH TERMS...
π¦ DESCRIPTION π¦
So here's the tea, bestie: you hand her a URL pointing at an OpenSearch Description file, you throw in your SEARCH TERMS plus whatever other options you want filled in, and she hands you back the URL of a query generated from that description. iconic behaviour, no cap. β¨
If the description file has multiple search types on offer (very main character of it), you can use -H, -A and -R to say which type you actually want. For example, -A -R is you going "give me an Atom responseβ¦ or bestie, if you can't do that, fall back to RSS, I'm flexible." πββοΈ By default she just uses the first URL found in the description file β first come, first served, periodt.
Now the real talk: not all web sites implement all (or even any) of the optional OpenSearch parameters. And when you use those options on those sites? The corresponding options get silently ignored. No error, no drama, justβ¦ nothing. She's not going to yell at you about it. π
π OPTIONS π
-qβ give no output on errors. Yep, she goes quiet. In that case you gotta consult the exit code to figure out what went wrong (go peek at DIAGNOSTICS, bestie). π€«-Hβ request an HTML response.-Aβ request an Atom response.-Rβ request an RSS response.-H,-A, and-Rcan be combined to express response type priority and specify fallback types. so you can stack your faves in order of preference. slay. π-c COUNT,--count=COUNTβ requestCOUNTresults. OpenSearch parameter:count.-i INDEX,--startindex=INDEXβ request results start at offsetNUM. OpenSearch parameter:startIndex.-p PAGENUM,--startpage=PAGENUMβ request results pagePAGENUM. OpenSearch parameter:pageIndex.-l LANG,--language=LANGβ request results inLANG.LANGshould be a 2-letter ISO country code (likeenorde, iykyk π). OpenSearch parameter:language.-O ENC,--outputencoding=ENCβ request results encoded inENC(default:UTF-8). OpenSearch parameter:outputEncoding.-I ENC,--inputencoding=ENCβ specify that your search terms are encoded inENC(default:UTF-8). OpenSearch parameter:inputEncoding.-h,--helpβ show a short help message. she'll explain herself, briefly. π«Ά--β end of options. that's it, that's the flag. the door is closed. πͺ
π DIAGNOSTICS π
You can consult the exit code to determine errors, like so:
0β Success. π (we love to see it)1β Error fetching OpenSearch Description URL.2β Error parsing OpenSearch Description.3β No matching search type found.4β Cannot find perl moduleWWW::OpenSearch.5β Unhandled error fromWWW::OpenSearch.
π§ DEPENDENCIES π§
She requires the module WWW::OpenSearch β which is the Debian package libwww-opensearch-perl, if that's your flavour. π
π BUGS π
- Only supports GET queries. that's it. that's the limit. she's a GET girlie only. π«
- Please report any bugs found to
ianb@erislabs.net. tell him bestie sent you. π
π SEE ALSO π
π AUTHOR π
Ian Beckwith <ianb@erislabs.net> β the actual legend behind this whole thing. π
π COPYRIGHT AND LICENSE π
Copyright 2006 Ian Beckwith <ianb@erislabs.net>
Licensed under the same terms as surfraw.
okay so that's the whole page, you're fully caught up bestie, go generate some queries π β¨
perl v5.36.0 Β· 2022-12-29 β mwah, love u, bye π«ΆππΈ
π¦ where this page comes from
- debian bookworm: surfraw-extra 2.3.0-2 Β· LicenseRef-public-domain
- debian trixie: surfraw-extra 2.3.0-2 Β· LicenseRef-public-domain
- ubuntu noble: surfraw-extra 2.3.0-2 Β· LicenseRef-public-domain
- ubuntu questing: surfraw-extra 2.3.0-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms