AUTOSEARCH(1)
๐ฆ AUTOSEARCH(1) ๐ฆ
Part 1 of 2 ๐ Okay bestie, this is the User Contributed Perl Documentation manual page, and it's LONG, so we're splitting it up. Here's part one โจ
โจ NAME โจ
AutoSearch is a web-search tracking application ๐ฅ
๐ SYNOPSIS ๐
AutoSearch [--stats] [--verbose] -n "Query Name" -s "query string"
--engine engine [--mail you@where.com] [--options "opt=val"]...
[--filter "filter"] [--host host] [--port port] [--userid bbunny
--password c4rr0t5] [--ignore_channels KABC,KCBS,KNBC] qid
AutoSearch --VERSION AutoSearch --help AutoSearch --man
Okay that's a lot of flags ๐ญ but it's all in the lineup above, so no stress ๐
๐ DESCRIPTION ๐
AutoSearch runs a web-based search and dumps the results into qid/index.html ๐
Later runs (that's the second form up in the SYNOPSIS) figure out what changed since the last time, and those changes get recorded in qid/YYYYMMDD.html โจ
AutoSearch is cron-job friendly because all the input parameters get saved in the web pages ๐ง So it basically works as an automated query agent for one particular search. The output files are a set of web pages you can view in a browser, so your results look cute ๐
๐ธ Example
AutoSearch -n 'LSAM Replication'
-s '"lsam replication"'
-e AltaVista
replication_query
Heads up, that whole thing should be on one line ๐ It makes a replication_query directory and fills it with AltaVista's results for "lsam replication", with pages titled "LSAM Replication" ๐ฆ Quick quoting tea: the single quotes around '"lsam replication"' are for the shell, and the double quotes tell AltaVista to search for the whole phrase instead of the separate words. Iconic ๐
๐ A more complicated example
AutoSearch -n 'External Links to LSAM'
-s '(link:www.isi.edu/lsam or link:www.isi.edu/~lsam) -url:isi.edu'
-e AltaVista::AdvancedWeb
-o coolness=hot
This one does an advanced AltaVista search and passes along the (hypothetical) coolness option to the search engine. Main character energy ๐
โจ OPTIONS โจ
qidโ this is the query identifier, and it's the directory where every file for this query and its results lives ๐๏ธ It can be an absolute path or a relative path from cwd. If the directory doesn't exist yet, it gets created and a brand new search starts ๐ฑ--statsโ shows the search stats: the query string, number of hits, number of filtered hits, filter string, number of suspended (deleted) hits, previous set size, current set size, and more ๐-v,--verboseโ extra chatty mode ๐ฃ๏ธ You get additional messages and warnings-n,--qn,--querynameโ sets the query name ๐ท๏ธ It's used as the heading on your web pages, so make it a nice-looking version of your query string โจ-s,--qs,--querystringโ sets the query string ๐ This is the exact text sent to the search engine, and you can add special characters to group or qualify your search ๐-e,--engineโ picks the search engine ๐ฏ Your query string gets submitted to the one you name. Lots of engines have specialized versions, like AltaVista::AdvancedWeb and AltaVista::News, which unlock more powerful searches and Usenet searches ๐ง For the deets on those variations, check out AltaVista or the man page for your search engine--listnewurlsโ along with all the normal file maintenance, prints every new URL to STDOUT, one per line ๐ฆ-o,--optionsโ sends query options to the search engine alongside the query string ๐๏ธ This lets you tweak the query for a specific engine or option, and you can use more than one. For example,-o what=newsmakes AltaVista search Usenet. It works, but the preferred move is-e AltaVista::Newsor-e AltaVista::AdvancedNews. Options are meant for internal or expert use, bestie ๐งโ๐ป-f,--uf,--urlfilterโ a regular expression that gets compared against the URLs of your results ๐ซ If one matches (case-insensitive), it's removed from the hit set. For example,-f '.*\.isi\.edu'avoids all of ISI's web pages ๐ โโ๏ธ--cleanup iโ deletes all traces of query results from more thanidays ago ๐งน If--cleanupis given, every other option except the qid gets ignored ๐--cmdlineโ rebuilds the complete command line (AutoSearch and all its arguments) that was used to create the query results ๐งพ The command line gets shown on STDERR. If--cmdlineis given, every other option except the qid gets ignored ๐--mail user@address,-m user@addressโ after the search finishes, emails that user the NEW results in HTML format ๐ This requires theEmail::Sendand related modules. If you send through an SMTP server, set the environment variableSMTPSERVERto your server name or IP address ๐ If your SMTP server needs a password, set the environment variablesSMTPUSERNAMEandSMTPPASSWORD๐ If you send via sendmail, set the environment variableSENDMAILwhen the sendmail executable isn't in the path ๐ฎ--emailfrom user@addressโ if your outgoing mail server is being picky and rejects email from certain users, use this to set the From: header ๐--userid bbunnyโ if the search engine needs a login and password (like Ebay::Completed), use this ๐ชช--password Carr0t5โ if the search engine needs a login and password (like Ebay::Mature), use this ๐
โจ CHANGING THE LOOK OF THE PAGES โจ
okay bestie, the basic format of these two pages is super simple AND customizable ๐ the one big rule is that the basic structure has to stay exactly the same ๐ญ HTML comments are how it finds each section of the doc. You can change almost everything, except the strings that mark where sections start and end ๐ซถ
Here are the noteworthy tags and what they do ๐
<!--Top-->.*<!--/Top-->โ whatever text lives inside this tag gets placed at the very top of the output page ๐ If the text includes the magic phraseAutoSearch WEB Searching, the query name swaps in to replace it. If there's no magic phrase and it's the very first search ever, AutoSearch will ask the user for a query name ๐โโ๏ธ<!--Query{.*}/Query-->โ the text between the braces is the query string ๐ This is how AutoSearch keeps track of it. You can change it, but ONLY inqid/index.html๐ซ The textask useris special and forces AutoSearch to request the search string from the user ๐ค<!--SearchEngine{.*}/SearchEngine-->โ the text between the braces is the search engine ๐ The other engines it supports areHotBotandLycos๐ธ You can edit it to change the engine, but ONLY inqid/index.html. The textask useris special here too, and forces AutoSearch to request the search string from the user ๐<!--QueryOptions{.*}/QueryOptions-->โ the text between the braces specifies a query option โจ You can use this tag multiple times to set multiple options ๐ซง<!--URLFilter{.*}/URLFilter-->โ the text between the braces is the URL filter ๐งน This is how AutoSearch maintains the filter. You can edit it, but ONLY inqid/index.html๐ซ The textask useris special and forces AutoSearch to ask the user (STDIN) for the query string ๐ค When setting up the very first search, you have to editfirst_index.html, NOTqid/index.html๐ The URL filter is a standard perl5 regular expression ๐ง URLs that don't match get KEPT ๐<!--Bottom-->.*<!--/Bottom-->โ the text inside this tag goes at the very bottom of the output page ๐ It's a great spot for navigation, page owner info, etc. ๐งญ
The rest of the tags come in a trio: ~Heading, ~Template, and ~, where ~ is Summary, Weekly, Appended, or Suspended ๐ฆ The sub-sections show up in the order given. To make a section, AutoSearch outputs the heading, then the template, then the section itself, then n copies of the formatted data, then a /section closer. Here's what each tag does:
~Headingโ identifies the heading for a section of the output file. SoSummaryHeadingis for the summary part, and so on. A section can be empty (likeSuspended), and in that case no heading gets output ๐ซฅ~Templateโ defines how each item gets formatted. It's simple text replacement that turns the template into the real output text. The text to be replaced is written in ALLCAPS ๐~โ locates the section (Summary, Weekly, etc.). This is where the actual n items of data live ๐ฆ
You can edit these values in the qid/index.html page of an existing search ๐ป The file first_index.html (in the directory above qid) is used as a default template for new queries ๐ฑ
Examples of these files can be seen under http://www.isi.edu/lsam/tools/autosearch/, or in the output generated by a brand-new AutoSearch ๐
๐ FILES ๐
first_index.htmlโ optional file that sets the default format of theindex.htmlfile for a new query ๐ทfirst_date.htmlโ optional file that sets the default format of theYYYYMMDD.htmlfile for a new query ๐ทqid/index.htmlโ (automatically created) the latest search results, plus a reverse chronological list of periodic searches ๐qid/date.htmlโ file used as a template for theYYYYMMDD.htmlfiles ๐งqid/YYYYMMDD.htmlโ (automatically created) a summary of changes for a particular date, AKA the 'Weekly' file ๐
The optional files first_index.html and first_date.html are used for the initial search as templates for qid/index.html and date.html, respectively. If either of these files doesn't exist, a default-default template is stored within the AutoSearch source ๐ซ The whole point is to let a user set up a framework for a group of search sets that share a common format ๐ By leaving the default query name and query string alone, they'll be overridden by command line inputs ๐ฅ๏ธ
๐ฏ SEE ALSO ๐ฏ
For the library, see WWW::Search. For the perl regular expressions, see perlre. ๐ง
โ๏ธ AUTHORS โ๏ธ
Wm. L. Scheding ๐๏ธ
AutoSearch is a re-implementation of an earlier version written by Kedar Jog ๐ซถ
โ๏ธ COPYRIGHT โ๏ธ
Copyright (C) 1996-1997 University of Southern California. All rights reserved. ๐๏ธ
Redistribution and use in source and binary forms are permitted, as long as the above copyright notice and this paragraph are duplicated in all such forms. Any documentation, advertising materials, and other materials related to that distribution and use have to acknowledge that the software was developed by the University of Southern California, Information Sciences Institute. The name of the University may not be used to endorse or promote products derived from this software without specific prior written permission ๐
THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ๐จ
๐ก DESIRED FEATURES ๐ก
These are good ideas that people have suggested ๐ง
URL validation.
Validate the status of each URL (with HTTP HEAD requests) and indicate that status in the output ๐
Multi-search.
It should be possible to merge the results of searches from two search engines. If this merger were done as a new search engine, the operation would be transparent to AutoSearch ๐ฆ
๐ BUGS ๐
None known at this time ๐ If any crop up, please let the maintainer know at mthurn@cpan.org ๐
That's the whole page, bestie ๐ This one comes from perl v5.42.0, dated 2025-07-25, and it's AUTOSEARCH(1) ๐ slay forever ๐ โจ
๐ฆ where this page comes from
- fedora 43: perl-WWW-Search 2.519-17.fc43 ยท LicenseRef-Callaway-BSD
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms