final glitches

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@67 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2000-04-07 12:25:02 +00:00
parent 87c82f1250
commit 119a053269
3 changed files with 21 additions and 6 deletions

2
debian/changelog vendored
View file

@ -1,4 +1,4 @@
linkchecker (1.2.0) stable; urgency=low
linkchecker (1.2.0) unstable; urgency=low
* stable release
* fixed usage text glitches

View file

@ -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.<br>")
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))+
"</font></blockquote><br><hr noshade size=1><small>"+
MyFont+Config.HtmlAppInfo+"<br>Get the newest version at "
"<a href=\""+Config.Url+"\">"+Config.Url+

View file

@ -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)