📄 modern.cf
字号:
# FailBrokerResults is printed when the broker results end in error#<FailBrokerResults>\n<STRONG>$msg</STRONG><BR>\n</FailBrokerResults># PER-OBJECT DEFINITIONS# ======================## VARIABLES:## $url Object url: http://www.cia.gov:3333/Spies/KGB/secret.html# $A URL Access: http# $H URL Host : www.cia.gov:3333# $P URL Path : /Spies/KGB/secret.html# $D URL Dir : /Spies/KGB/# $F URL File : secret.html# $cs_url URL to the SOIF object in the broker databse# $cs_[ahp] elements of $cs_url as above with $url# $desc Description attribute of the matched object# $opaque A matched line (or all matched lines in obj-at-a-time mode)# $usermsg A user message# $attributes Requested attributes# $objectType Type of object if not HTML# $objectSize Size of object# $objectDate Last modification date of object#<PrintObject><DT>$objectnum <A HREF="$url">$description</A> <FONT size=-1 color=#606060>$objectType</FONT> <FONT size=-1 color=#606060>$objectSize</FONT> $objectWeight<DD>$attributes<DD>$opaque<?$cs_urlX><DD><B>indexing data:</B><A HREF="$cs_a://$cs_h/Harvest/cgi-bin/displaySOIF.cgi?object=$cs_p&query=$html_query">formatted</A>·<A HREF="$cs_a://$cs_h/Harvest/cgi-bin/displaySOIF.cgi?object=$cs_p&style=plain">plain</A></?$cs_urlX><DD><FONT size=-1 color=#006000>$url</font> <FONT size=-1 color=#606060>$objectUpdate</FONT><BR><BR></PrintObject># This definition is eval'd for each opaque (i.e. matched) line retruned by# the broker. It is intended to be used to remove SOIF attributes# and the 'Matched line' string from the output.# The results of these operations are stored in $opaque.#<MatchedLineSub>#1. Completely remove lines with @FILEs/^(.*)\@FILE(.*)$/ /;#2. Remove "Matched line #"s/^(.*)\# (.*)$/$2/;#3. Remove "{12}:" etc.s/^(.*)\}:(.*)$/$2/;#4. Remove leading and trailing whitespacess/^\s+//;s/\s+$//;#5. Limit length to 10 words per matched line.s/^(((\s*)(\S*)){10}).*$/$1/;#6. show 4 matched lines, set maximum length and avoid double matched lines.if ($opaquePerObjectCount>4 || length($_)>120 || $lastOpaqueObject eq $_ ) { $_ = ""; #no output} else { $lastOpaqueObject=$_; $opaquePerObjectCount++; s/(.*)/... $1/; #OK, add dots.}#highlight search words.for ($i=0; $i<=$#searchwords; $i++) { s/(\b$searchwords[$i]\b)/<font color=#800000>$1<\/font>/ig;}</MatchedLineSub># PerObjectFunction is eval'd before every object is printed out.#<PerObjectFunction># init output variables$objectType="";$objectSize="";$objectUpdate="";$objectWeight = "";$opaquePerObjectCount = 1;$lastOpaqueObject = "";# create description$description = "<I>File:</I> $F";$description = $desc if (length($desc) > 5);# highlight search words.for ($i=0; $i<=$#searchwords; $i++) { s/(\b$searchwords[$i]\b)/<b>$1<\/b>/ig;}# Create the HTML code to print the weight ballsif ($maxWeight > 0 && $weightflag){ $nWeight = int($weight * 5 / $maxWeight); for ($idxWeight = 1; $idxWeight <= $nWeight; $idxWeight++) { $objectWeight .= "<img alt=\"*\" src=\"$weightIcon\">"; }# $objectWeight = "<font size=-1 color=#606060>".int($weight * 100 / $maxWeight)."%</font>";}# format matched linesif ($opaque ne '') { $opaque = "<strong>matches:</strong> $opaque..."}</PerObjectFunction># PerAttributeFunction is eval'd before the Attributes are printed out.#<PerAttributeFunction># Remove all empty lines$val =~ s/^(\s*)//mg;# Now prepare the object's type and size to display at the description.if ($att eq "type") { ## show file type $objectType = "[".$val."]" if !($val =~ /HTML|HTTP-Query/); $att=""; # avoid <FormatAttribute>} elsif ($att eq "file-size") { ## calculate file size $val = int($val/1024); $objectSize = $val." KByte" if ($val > 150); # more than 150 KByte $val = int($val/10.24); $objectSize = ($val/100)." MByte" if ($val > 100); # more than one meg $att="";} elsif ($att eq "last-modification-time") { ## calculate last modification date local(@date,@months,$month,$minute,$year); @date = localtime($val); @months = ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); $month = $months[$date[4]]; $minute = $date[1]; $minute = "0$minute" if $minute < 10; $year = $date[5]+1900; $objectUpdate = "$date[3]-$month-$year"; # $date[2]:$minute"; $att="";} else { ## other attributes # insert commas to separate headings $val =~ s/\n(.)/, $1/mg; # If more than 120 Characters, display only the first 120 plus "..." $val =~ s/^((.|\n){120})(.|\n)*/$1.../; #highlight search words. for ($i=0; $i<=$#searchwords; $i++) { $val =~ s/(\b$searchwords[$i]\b)/<font color=#800000>$1<\/font>/ig; }}</PerAttributeFunction># Format Requested Attributes. Before this is eval'd, $att and $val# should be set.#<FormatAttribute><STRONG>$att:</STRONG> $val<BR></FormatAttribute># ======================================================================# ERROR, STATUS and WARNING functions# ======================================================================# The message printed to the browser and logged to the HTTP server log# when the processes is killed. If the Timeout time is reached, the# process dies from SIGALRM. The short name of the offending signal# is placed in $sig.#<sigdie>Killed by SIG$sig...\n</sigdie># How to format the object number. Use a printf format specification# to left/right justify, or whatever. Do not include quotes around# the format string.#<ObjectNumPrintf>%2d.</ObjectNumPrintf># A warning message printed only when the broker might have truncated# the result set. Only printed if the number of matched lines equals# the 'maxresultflag' or the number of returned objects equals the# 'maxobjflag' value of the query.html form.#<TruncateWarning><P><STRONG>WARNING: The search results were truncated at $nopaquelinesmatched lines and $nreturned found objects.</STRONG><P>\n</TruncateWarning># A warning message printed only when the broker returned 0 results.#<EmptySetWarning><H2>Your query <font color="#800000">$html_query</font> did not match any document.</H2>#<P>Your query either <em>did not match</em> any information in this Broker, or you <em>may</em> have specified a query that is not supported by this Broker's search subsystem.<P>Suggestions:<UL><LI>Make sure all words are spelled correctly<LI>Try different, less or more general keywords<LI>Select the "particial word search" on the search page to allow searches in words.<LI>Allow "spelling errors" on the search page.</UL>Please refer to the<A HREF="/Harvest/brokers/queryhelp.html">help on formulating queries</A>for further assistance.<P>\n</EmptySetWarning># Error Message returned if there is no query string sent.#<NoQuery><H2>No query entered.</H2>Please enter one or several search words.<BR><BR>\n</NoQuery># Message returned if the broker sends back a# 111 - Broker is too heavily loaded# reply.#<BrokerLoad></pre><P>Sorry, the search broker at <STRONG>$host, port $port</STRONG> is currently tooheavily loaded to process your request.<P>Please try again later.<P></BrokerLoad># Error message if broker is not available.#<BrokerDown><H2>Search engine temporarily not available.</H2>Sorry, the Broker at <STRONG>$host, port $port</STRONG> is unavailable.<P>Please try again later.<P>\n</BrokerDown># Message returned if the broker sends back a# 111 - PARSE ERROR# reply.#<ParseError></pre><H2>Your query <font color="#800000">$html_query</font> does not have the proper syntax.</H2><P>Please refer to the<A HREF="/Harvest/brokers/queryhelp.html">help in formulating queries</A>for details on the proper syntax.<P>Common syntax mistakes include:<UL><LI><STRONG>Not using quotes around phrases or regular expressions</STRONG>.<BR>For example, the <em>phrase</em>:<CODE>resource discovery</CODE> should be<CODE>"resource discovery"</CODE>.The <em>regular expression</em>:<CODE>res.* disc.*</CODE> should be<CODE>"res.* disc.*"</CODE>.Note that a <em>single dot</em> (``<CODE>.</CODE>'')in a keyword needs quotes (e.g. <CODE>"3.0"</CODE>).<LI><STRONG>Missing punctuation</STRONG>.<BR>Structured queries need a colon and optional parentheses. For example,<CODE>Type:PostScript</CODE> or, <CODE>(Type : PostScript)</CODE></UL>\n</ParseError>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -