⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 swedish.cf

📁 harvest是一个下载html网页得机器人
💻 CF
字号:
# $Id: swedish.cf, v1.0 2002/12/16 by Anders Wandahl <aw@kib.ki.se> translated from#  german.cf,v 1.01 2002/09/05 by Harald Weinreich <harald@weinreichs.de>## Swedish language modifications for modern.cf output definition file.## A hash (#) in the first column denotes a comment and is not processed# even inside a definition.  Hashes not in the first column are left as-is.## Variable substitution occurs on these definitions.  If you want# a dollar-sign ($) to occur in the output, escape it with backslash (\).# Other metacharacters (quotes, asterisks, etc) probably don't need to be# escaped.  Printf-like special characters are allowed: \n \t \r etc.## The ending newline is chopped off from each definiton.  So##   <FooBar>#   abcxyz#   </FooBar>## becomes "abcxyz".  You may have blank lines in between the beginning# and ending tags, or use the newline character \n.### CGI defaults are set in modern.cf<Default>charset       : ISO-8859-1</Default>############################################################################### RESULT SECTION## The output of '{nph-}search.cgi' consists of the following tags:##    ResultHeader		- modified#    CreateNavBars#    ResultSetBegin#    ( Errors from 'broker' )#    foreach object {#        PrintObject#    }#    ResultSetEnd#    EndBrokerResults#    ( TruncateWarning )#    ResultTrailer################################################################################# First output for the HTML containing the results.  Should probably include# <TITLE> tag and the user query.#<ResultHeader><HEAD><TITLE>S&ouml;kresultat f&ouml;r: $html_query</TITLE><style><!--dt { margin-left:1px; }dd { margin-left:40px; }// --></style></HEAD><BODY bgcolor=white><H2>S&ouml;kresultat f&ouml;r: <font color="#800000">$html_query</font></H2>$filterhint</ResultHeader># Calculations to obtain $navigationBar# Original code by Javier Masa Marin <masa@rediris.es>#<CreateNavBars>if ($totalPages > 0){  # elements before and after current page in navigation bar  local($navPart) = 5;  $prevPage = "";  $prevPage = "\n\n<a href=\"".&create_link($page-1)."\">&lt;= F&ouml;reg&aring;ende</a> &middot;" if ($page > 1);  $nextPage = "";  $nextPage = "&middot; <a class=\"navBar\" href=\"".&create_link($page+1)."\">N&auml;sta =&gt;</a>" if ($page < $totalPages);  $pageList = "";  local($startP) = ($page <= $navPart) ? 1 : $page - $navPart;  for ($i = $startP; $i < $page; $i++)  { $pageList .= "<a href=\"".&create_link($i)."\">$i</a>\n"; }  $pageList .= "<b><font color=\"#800000\" size=+1>$page</font></b>\n";  local($endP) = ($page + $navPart >= $totalPages) ? $totalPages : $page + $navPart;  for ($i = $page+1; $i <= $endP; $i++)  { $pageList .= "\n<a href=\"".&create_link($i)."\">$i</a>\n"; }  $navigationBar = "\n$prevPage\n $pageList\n $nextPage" if ($totalPages > 1);}</CreateNavBars># Output just before beginning the loop over objects returned by the broker.#<ResultSetBegin><form method="GET" action="/Harvest/cgi-bin/search.cgi">\n<table border="0" cellspacing=0 cellpadding=4 width="100%"><tr bgcolor="#E0E0E0">  <td align=left width="20%" nowrap>    $totnumber objekt funna  </td>  <td align=center width="60%">    $navigationBar  </td>  <td align=right width="20%">    Sida: $page/$totalPages  </td></tr><tr><td align=middle colspan=3> <input type=hidden name=broker value="$broker"> <input type=hidden name=hp_url value="$hp_url"> <input type=hidden name=caseflag value="$RQ{'caseflag'}"> <input type=hidden name=wordflag value="$RQ{'wordflag'}"># <input type=hidden name=opaqueflag value="$RQ{'opaqueflag'}"># <input type=hidden name=descflag value="$RQ{'descflag'}"># <input type=hidden name=maxresultflag value="$RQ{'maxresultflag'}"># <input type=hidden name=maxobjflag value="$RQ{'maxobjflag'}"># <input type=hidden name=maxlineflag value="$RQ{'maxlineflag'}"> <input type=hidden name=weightflag value="$RQ{'weightflag'}"> <input type=hidden name=attribute value="@atts"> <input type=hidden name=brokerqueryconfig value="$RQ{'brokerqueryconfig'}"><a href="$hp_url">Ny s&ouml;kning:</a> <input type=text name=query value='$RQ{'query'}'> <input type=submit value="Skicka"></td></tr></form></table><DL>\n</ResultSetBegin># output just after ending the loop over objects returned by the broker#<ResultSetEnd></DL><form method="GET" action="/Harvest/cgi-bin/search.cgi"><table border="0" width="100%" bgcolor="#E0E0E0"><tr> <td align="left" width="20%" nowrap>  <input type=hidden name=broker value="$broker">  <input type=hidden name=hp_url value="$hp_url">  <input type=hidden name=caseflag value="$RQ{'caseflag'}">  <input type=hidden name=wordflag value="$RQ{'wordflag'}">#  <input type=hidden name=opaqueflag value="$RQ{'opaqueflag'}">#  <input type=hidden name=descflag value="$RQ{'descflag'}">#  <input type=hidden name=maxresultflag value="$RQ{'maxresultflag'}">#  <input type=hidden name=maxobjflag value="$RQ{'maxobjflag'}">#  <input type=hidden name=maxlineflag value="$RQ{'maxlineflag'}">  <input type=hidden name=weightflag value="$RQ{'weightflag'}">  <input type=hidden name=attribute value="@atts">  <input type=hidden name=brokerqueryconfig value="$RQ{'brokerqueryconfig'}">  <a href="$hp_url">Ny s&ouml;kning:</a> <input type=text name=query size=15 value='$RQ{'query'}'> <input type=submit value="Skicka"> </td> <td align="center" width="60%">  $navigationBar </td>  <td align="right" width="20%"><a href="$CFG{'HarvestUrl'}"><img alt="Powered by Harvest" border="0" src="$harvestIcon"></a></td></table></form></ResultSetEnd># 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## 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>Datum:</I>&nbsp;&nbsp;$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>Tr&auml;ffar:</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', 'Maj', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', '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;   }   $att =~ s/headings/Rubriker/;}</PerAttributeFunction># ======================================================================# ERROR, STATUS and WARNING functions# ======================================================================# 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>VARNING: S&ouml;kresultatet avbr&ouml;ts vid $nopaquelinesmatchade rader och $nreturned funna objekt.</STRONG><P>\n</TruncateWarning># A warning message printed only when the broker returned 0 results.#<EmptySetWarning><H2>Din fr&aring;ga <font color="#800000">$html_query</font> resulterade inte i n&aring;gra tr&auml;ffar.</H2><P>F&ouml;rs&ouml;k formulera om fr&aring;gan.<P>F&ouml;rslag:<UL><LI>Kontrollera att alla ord &auml;r <B>r&auml;tt stavade</B>.<LI>G&ouml;r om s&ouml;kningen med andra, f&auml;rre eller <B>allm&auml;nnare s&ouml;kbegrepp</B>.<LI>V&auml;lj <B>s&ouml;k del av ord</B> p&aring; s&ouml;ksidan f&ouml;r att &auml;ven s&ouml;ka inom ord.<LI>V&auml;lj att<B> till&aring;ta stavfel</B> p&aring; s&ouml;ksidan.</UL><BR>Se vidare den <A HREF="/Harvest/brokers/queryhelp.html"> engelskspr&aring;kiga hj&auml;lpen </A> till hur man formulerar fr&aring;gor.<P>\n</EmptySetWarning># Error Message returned if there is no query string sent.#<NoQuery><H2>Du har inte angivit n&aring;gon s&ouml;kfr&aring;ga.</H2>Skriv in minst ett ord.<BR><BR>\n</NoQuery># Error message if broker is not available.#<BrokerDown>#<BrokerDown>#</pre><P><H2>S&ouml;kmaskinen $host, port $port &auml;r f&ouml;r n&auml;rvarande inte tillg&auml;nglig.</H2>Var god f&ouml;rs&ouml;k senare.<P></BrokerDown># Message returned if the broker sends back a#      111 - Broker is too heavily loaded# reply.#<BrokerLoad><H2>S&ouml:kmaskinen &auml;r &ouml;verbelastad.</H2>Vi beklagar, men s&ouml;kmasminen <STRONG>$host, port $port</STRONG>&auml;r f&ouml;r n&auml;rvarande &ouml;verbelastad. F&ouml;s&ouml;k senare.<P></BrokerLoad># Message returned if the broker sends back a#      111 - PARSE ERROR# reply.#<ParseError><H2>Din s&ouml;kfr&aring;ga <font color="#800000">$html_query</font> har inte r&auml;tt syntax.</H2><P>Den <A HREF="/Harvest/brokers/queryhelp.html">engelska hj&auml;lpen</A> visar hur en s&ouml;kfr&aring;ga med korrekt syntax skall formuleras.<P><P>Problem vid s&ouml;kningar har oftast f&ouml;jande orsaker:<UL><LI><STRONG>Anf&ouml;ringstecken (citationstecken) har inte anv&auml;nts vid s&ouml;kning p&aring; fraser eller regulj&auml;ra uttryck.</STRONG><BR>T. ex. skall frasen:<BR><CODE>resistent mot antibiotika</CODE> anges som<BR><CODE>"resistent mot antibiotika"</CODE>.<LI>Det <em>regulj&auml;ra uttrycket</em>:<BR><CODE>resist.* mot antibio.*</CODE> skall anges som<BR><CODE>"resist.* mot antibio.*"</CODE><LI>Notera att en <em>punkt</em>i ett s&ouml;kbegrepp alltid m&aring;ste omges av anf&ouml;ringstecken (t. ex. <CODE>"3.14"</CODE>).<BR><BR></UL><UL><LI><STRONG>Felaktig formulering vid s&ouml;kning p&aring; attribut.</STRONG>.<BR>Strukturerade fr&aring;gor sker med kolon (:), t. ex.<BR><CODE>Author: Berglund</CODE></UL>\n</ParseError>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -