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

📄 info-to-html.pl.in

📁 harvest是一个下载html网页得机器人
💻 IN
字号:
#!@PERL@##  Reads a gatherer @INFO (stats) SOIF object and writes an HTML page##      gather -info host port | info-to-html.pl > host.port.html##  Assumes only one @INFO object is presented on stdin.## $Id: info-to-html.pl,v 2.3 2000/02/03 12:45:55 sxw Exp $#$ENV{'HARVEST_HOME'} = "@prefix@" if (!defined($ENV{'HARVEST_HOME'}));unshift(@INC, "$ENV{'HARVEST_HOME'}/lib");      # use local filesrequire 'soif.pl';# Read and parse the SOIF input#$soif::input = 'STDIN';($ttype, $url, %SOIF) = soif::parse();exit 1 if ($ttype ne "INFO");# book keeping attributes irrelevant for searching%bookkeep = (	     "gatherer-host"    => 1,	     "gatherer-name"    => 1,	     "gatherer-version" => 1,	     "md5"              => 1,	     "refresh-rate"     => 1,	     "time-to-live"     => 1,	     "update-time"      => 1	     );$time0 = localtime (time);$time1 = localtime ($SOIF{'Min-Update-Time'});$time2 = localtime ($SOIF{'Max-Update-Time'});# Write out some HTML#print <<EOF;<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><HTML><HEAD><TITLE>$SOIF{'Gatherer-Name'} Gatherer Statistics</TITLE></HEAD><BODY><H2>Gatherer: $SOIF{'Gatherer-Name'}</H2><P>The Gatherer Host is <B>$SOIF{'Gatherer-Host'}</B><P>The gatherer database contains <B>$SOIF{'Object-Count'}</B> objects collected between<B>$time1</B> and <B>$time2</B>.<P>The following attributes occur in at least 25% of the objects:<PRE>EOF	$N = $SOIF{'Object-Count'};	if ($N > 0) {		foreach (split (/\n/, $SOIF{'Attribute-Histogram'})) {			($n, $x) = /\s*(\d+)\s+(\S+)$/;			print "      $x\n" if (!$bookkeep{lc($x)} && ($n / $N >= 0.25));		}	}	print <<EOF;</PRE><HR>Generated $time0</BODY></HTML>EOFexit 0;

⌨️ 快捷键说明

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