OPENSEA...GENQUERY(1)

πŸ“¦
version 2.3.0 Β· 5 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

πŸ’– 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 -R can 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 β€” request COUNT results. OpenSearch parameter: count.
  • -i INDEX, --startindex=INDEX β€” request results start at offset NUM. OpenSearch parameter: startIndex.
  • -p PAGENUM, --startpage=PAGENUM β€” request results page PAGENUM. OpenSearch parameter: pageIndex.
  • -l LANG, --language=LANG β€” request results in LANG. LANG should be a 2-letter ISO country code (like en or de, iykyk 🌍). OpenSearch parameter: language.
  • -O ENC, --outputencoding=ENC β€” request results encoded in ENC (default: UTF-8). OpenSearch parameter: outputEncoding.
  • -I ENC, --inputencoding=ENC β€” specify that your search terms are encoded in ENC (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 module WWW::OpenSearch.
  • 5 β€” Unhandled error from WWW::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 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