From 119a053269472f3b4c6de81c1d6a858a96069aa8 Mon Sep 17 00:00:00 2001 From: calvin Date: Fri, 7 Apr 2000 12:25:02 +0000 Subject: [PATCH] final glitches git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@67 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- debian/changelog | 2 +- linkcheck/Logging.py | 19 +++++++++++++++++-- linkchecker | 6 +++--- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index e5de2b76..7de1de7b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -linkchecker (1.2.0) stable; urgency=low +linkchecker (1.2.0) unstable; urgency=low * stable release * fixed usage text glitches diff --git a/linkcheck/Logging.py b/linkcheck/Logging.py index 4a59fa06..712312f5 100644 --- a/linkcheck/Logging.py +++ b/linkcheck/Logging.py @@ -1,3 +1,18 @@ +"""Logger classes. + +Every Logger has to implement the following functions: +init(self) + Called once to initialize the Logger. Why do we not use __init__(self)? + Because we initialize the start time in init and __init__ gets not + called at the time the checking starts. + +newUrl(self,urlData) + Called every time an url finished checking. All data we checked is in + the UrlData object urlData. + +endOfOutput(self) + Called at the end of checking to close filehandles and such. +""" import sys,time,Config,StringUtil # ANSI color codes @@ -83,7 +98,7 @@ class StandardLogger: self.fd.write("Check Time %.3f seconds\n" % urldata.checktime) if urldata.infoString: self.fd.write("Info "+StringUtil.indent( - StringUtil.blocktext(urldata.infoString, 65), 11)+"\n") + StringUtil.blocktext(urldata.infoString, 65), 11)+"\n") if urldata.warningString: self.warnings = self.warnings+1 self.fd.write("Warning "+StringUtil.indent( @@ -198,7 +213,7 @@ class HtmlLogger(StandardLogger): self.fd.write(" found.
") self.stoptime = time.time() self.fd.write("Stopped checking at"+_strtime(self.stoptime)+ - ("(%.3f seconds)" % (self.stoptime - self.starttime))+ + (" (%.3f seconds)" % (self.stoptime - self.starttime))+ "

"+ MyFont+Config.HtmlAppInfo+"
Get the newest version at " ""+Config.Url+ diff --git a/linkchecker b/linkchecker index 9bedf612..5c8997e3 100755 --- a/linkchecker +++ b/linkchecker @@ -37,7 +37,7 @@ OPTIONS Swap checking order to intern/extern. Default checking order is extern/intern. -N, --nntp-server - Specify an NNTP server for news: links. Default is the + Specify an NNTP server for 'news:...' links. Default is the environment variable NNTP_SERVER. If no host is given, only the syntax of the link is checked. -o name, --output=name @@ -106,8 +106,6 @@ o Local files and syntactic sugar on the command line: linkchecker ../bla.html linkchecker www.myhomepage.de linkchecker -r0 ftp.linux.org -o Using the -W option: - linkchecker -W"traceback" -r5 http://zope.company.com/ """ def printVersion(): @@ -264,6 +262,7 @@ for opt,arg in options: if constructauth: congif["authentication"].insert(0, (re.compile(".*"), _user, _password)) +# construct the url list if len(args)==0: printUsage("no files or urls given") @@ -275,4 +274,5 @@ for url in args: url = "http://"+url config.appendUrl(linkcheck.UrlData.GetUrlDataFrom(url, 0)) +# check the urls linkcheck.checkUrls(config)