changelog

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@363 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2002-02-08 16:22:55 +00:00
parent 702a77baea
commit cb47dcecdd
10 changed files with 68 additions and 55 deletions

11
debian/changelog vendored
View file

@ -1,3 +1,14 @@
linkchecker (1.3.19) unstable; urgency=low
* minor updates for documentation and german translation
* linkcheck/timeoutsocket.py: new upstream release
* linkchecker: use config.warn for warnings and use timeoutsocket
module on all platforms
* linkcheck/Logging.py: call constructor of base class in all loggers
and fix the blacklist logger
-- Bastian Kleineidam <calvin@debian.org> Fri, 8 Feb 2002 17:23:51 +0100
linkchecker (1.3.18) unstable; urgency=low
* linkcheck/HttpUrlData.py: cope with malformed http_proxy settings

View file

@ -205,7 +205,7 @@ class CSV(UserList.UserList):
if found_comment:
del lines[lines__pos]
else:
lines__pos = lines__pos + 1
lines__pos += 1
# Process the input data
@ -242,15 +242,15 @@ class CSV(UserList.UserList):
done__any = 0
for field in entry:
if done__any:
str = str + separator
str += separator
else:
done__any = 1
if type(field) != types.StringType:
field = `field`
if len(field) > 0 and (string.find(field, separator) != -1 or (field[0] == " " or field[-1] == " ")):
str = str + "\"" + field + "\""
str += '"%s"'%field
else:
str = str + field
str += field
return str
@ -259,7 +259,7 @@ class CSV(UserList.UserList):
str = line__make(self.fields__title) + "\n\n"
else:
str = ""
str = str + string.join(map(line__make, self.data), "\n") + "\n"
str += string.join(map(line__make, self.data), "\n") + "\n"
return str
@ -342,7 +342,7 @@ class CSV(UserList.UserList):
else:
str = ""
for entry in self:
str = str + string.join(map(string.ljust, map(lambda a : (type(a) == types.StringType and [a] or [eval("`a`")])[0], entry.data), columns__width), " ") + "\n"
str += string.join(map(string.ljust, map(lambda a : (type(a) == types.StringType and [a] or [eval("`a`")])[0], entry.data), columns__width), " ") + "\n"
return str

View file

@ -314,18 +314,22 @@ class Configuration(UserDict.UserDict):
self.threader.startThread(url.check, (self,))
def urlCache_has_key_Threads(self, key):
ret = None
try:
self.urlCacheLock.acquire()
return self.urlCache.has_key(key)
ret = self.urlCache.has_key(key)
finally:
self.urlCacheLock.release()
return ret
def urlCache_get_Threads(self, key):
ret = None
try:
self.urlCacheLock.acquire()
return self.urlCache[key]
ret = self.urlCache[key]
finally:
self.urlCacheLock.release()
return ret
def urlCache_set_Threads(self, key, val):
try:
@ -335,18 +339,22 @@ class Configuration(UserDict.UserDict):
self.urlCacheLock.release()
def robotsTxtCache_has_key_Threads(self, key):
ret = None
try:
self.robotsTxtCacheLock.acquire()
return self.robotsTxtCache.has_key(key)
ret = self.robotsTxtCache.has_key(key)
finally:
self.robotsTxtCacheLock.release()
return ret
def robotsTxtCache_get_Threads(self, key):
ret = None
try:
self.robotsTxtCacheLock.acquire()
return self.robotsTxtCache[key]
ret = self.robotsTxtCache[key]
finally:
self.robotsTxtCacheLock.release()
return ret
def robotsTxtCache_set_Threads(self, key, val):
try:
@ -374,15 +382,14 @@ class Configuration(UserDict.UserDict):
self.readConfig(files)
def warn(self, msg):
self.message("Config: WARNING: "+msg)
self.message(_("warning: %s")%msg)
def error(self, msg):
self.message("Config: ERROR: "+msg)
self.message(_("error: %s")%msg)
def message(self, msg):
sys.stderr.write(msg+"\n")
sys.stderr.flush()
print >> sys.stderr, msg
def readConfig(self, files):

View file

@ -709,6 +709,7 @@ class BlacklistLogger(Logger):
we have only links on the list which failed for n days.
"""
def __init__(self, **args):
apply(Logger.__init__, (self,), args)
self.errors = 0
self.blacklist = {}
self.filename = args['filename']
@ -725,7 +726,7 @@ class BlacklistLogger(Logger):
def endOfOutput(self, linknumber=-1):
"""write the blacklist"""
fd = open(args['filename'], "w")
fd = open(self.filename, "w")
for url in self.blacklist.keys():
if self.blacklist[url] is None:
fd.write(url+"\n")
@ -806,9 +807,6 @@ class CSVLogger(StandardLogger):
class TestLogger(Logger):
""" Output for regression test """
def __init__(self, **args):
pass
def init(self):
pass

View file

@ -243,6 +243,7 @@ class UrlData:
except:
internal_error()
def _check(self, config):
debug(BRING_IT_ON, "Checking", self)
if self.recursionLevel and config['wait']:

View file

@ -29,9 +29,7 @@ try:
except IOError:
_ = lambda s: s
#import timeoutsocket
#timeoutsocket.setDefaultSocketTimeout(20)
import timeoutsocket
import Config, UrlData, sys, lc_cgi
from debuglevels import *
debug = Config.debug
@ -57,4 +55,4 @@ def checkUrls(config):
except KeyboardInterrupt:
config.finish()
config.log_endOfOutput()
sys.stderr.write("linkcheck: warning: keyboard interrupt\n")
sys.stderr.write(_("linkcheck: warning: keyboard interrupt\n"))

View file

@ -24,8 +24,7 @@ if sys.version[:5] < "2.0":
import getopt, re, os, urlparse, pprint, linkcheck
from linkcheck.debuglevels import *
from linkcheck import _,StringUtil
if os.name!='nt':
from linkcheck import timeoutsocket
Usage = _("""USAGE\tlinkchecker [options] file-or-url...
@ -33,17 +32,18 @@ OPTIONS
For single-letter option arguments the space is not a necessity. So
'-o colored' is the same as '-ocolored'.
-a, --anchors
Check anchor references. Default is don't check anchors.
Check HTTP anchor references. Default is don't check anchors.
-d, --denyallow
Swap checking order to extern/intern. Default checking order
is intern/extern.
-D, --debug
Print additional debugging information.
Print debugging information. Provide this option multiple times
for even more debugging information.
-e regex, --extern=regex
Assume urls that match the given expression as extern.
Only intern HTML links are checked recursively.
-f file, --config=file
Use file as configuration file. Ad default LinkChecker first
Use file as configuration file. As default LinkChecker first
searches /etc/linkcheckerrc and then ~/.linkcheckerrc
(under Windows <path-to-program>\\linkcheckerrc).
-F type[/filename], --file-output=type[/filename]
@ -64,8 +64,7 @@ For single-letter option arguments the space is not a necessity. So
environment variable NNTP_SERVER. If no host is given,
only the syntax of the link is checked.
-o type, --output=type
Specify output type as %s.
Default type is text.
Specify output type as %s. Default type is text.
-p pwd, --password=pwd
Try password pwd for HTML and FTP authorization.
Default password is 'joe@'. See also -u.
@ -286,10 +285,7 @@ for opt,arg in options:
config.disableThreading()
elif opt=="--timeout":
if os.name!='nt':
timeoutsocket.setDefaultSocketTimeout(int(arg))
else:
print >> sys.stderr, _("warning: timeoutsocket is not support on this system")
linkcheck.timeoutsocket.setDefaultSocketTimeout(int(arg))
elif opt=="-u" or opt=="--user":
_user = arg
@ -331,7 +327,7 @@ if len(args)==0:
urls = raw_input(_("enter one or more urls, separated by white-space\n--> "))
args = urls.split()
else:
print _("warning: no files or urls given")
config.warn(_("no files or urls given"))
for url in args:
url = url.strip()

View file

@ -11,7 +11,7 @@ linkchecker \- check your HTML documents for broken links
]
.SH DESCRIPTION
.LP
linkchecker features
LinkChecker features
recursive checking,
multithreading,
output in colored or normal text, HTML, SQL, CSV or a sitemap
@ -30,21 +30,22 @@ For single-letter option arguments the space is not a necessity.
So \fI-o colored\fP is the same as \fI-ocolored\fP.
.TP
\fB-a\fP, \fB--anchors\fP
Check anchor references. Default is don't check anchors.
Check HTTP anchor references. Default is don't check anchors.
.TP
\fB-d\fP, \fB--denyallow\fP
Swap checking order to extern/intern. Default checking order is
intern/extern.
.TP
\fB-D\fP, \fB--debug\fP
Print debugging information.
Print debugging information. Provide this option multiple times
for even more debugging information.
.TP
\fB-e \fIregex\fP, \fB--extern=\fIregex\fP
Assume urls that match the given regular expression as extern.
Only intern HTML links are checked recursively.
.TP
\fB-f \fIfile\fP, \fB--config=\fIfile\fP
Use \fIfile\fP as configuration file. linkchecker first searches for
Use \fIfile\fP as configuration file. LinkChecker first searches for
~/.linkcheckerrc and then /etc/linkcheckerrc on Unix systems.
Under Windows systems we read <path-to-program>\\linkcheckerrc.
.TP
@ -60,7 +61,7 @@ Ask for url if none are given on the commandline.
.TP
\fB-i \fIregex\fP, \fB--intern=\fIregex\fP
Assume URLs that match the given regular expression as intern.
linkchecker descends recursively only to intern URLs, not to extern.
LinkChecker descends recursively only to intern URLs, not to extern.
.TP
\fB-h\fP, \fB--help\fP
Help me! Print usage information for this program.
@ -128,7 +129,7 @@ Use this to check for pages that contain some form of error, for example
'This page has moved' or 'Oracle Application Server error'.
This option implies \fB-w\fP.
.SH NOTES
Linkchecker assumes an \fIhttp://\fP resp. \fIftp://\fP link when a
LinkChecker assumes an \fIhttp://\fP resp. \fIftp://\fP link when a
commandline URL starts with \fIwww.\fP resp. \fIftp.\fP
You can also give local files as arguments.
@ -139,12 +140,12 @@ Use the -s and -i options to prevent this.
Javascript links are currently ignored.
If your platform does not support threading, linkchecker uses
If your platform does not support threading, LinkChecker uses
\fB-t0\fP.
You can supply multiple user/password pairs in a configuration file.
Cookies are not accepted by linkchecker.
Cookies are not accepted by LinkChecker.
To use proxies set $http_proxy, $https_proxy on Unix or Windows.
On a Mac use the Internet Config.
@ -159,8 +160,6 @@ http://treasure.calvinsplayground.de/~calvin/
\fPLocal files and syntactic sugar on the command line:
.br
\fIlinkchecker c:\\temp\\test.html
.br
linkchecker ../bla.html
.br
linkchecker www.myhomepage.de

View file

@ -98,17 +98,18 @@ msgid ""
"For single-letter option arguments the space is not a necessity. So\n"
"'-o colored' is the same as '-ocolored'.\n"
"-a, --anchors\n"
" Check anchor references. Default is don't check anchors.\n"
" Check HTTP anchor references. Default is don't check anchors.\n"
"-d, --denyallow\n"
" Swap checking order to extern/intern. Default checking order\n"
" is intern/extern.\n"
"-D, --debug\n"
" Print additional debugging information.\n"
" Print debugging information. Provide this option multiple times\n"
" for even more debugging information.\n"
"-e regex, --extern=regex\n"
" Assume urls that match the given expression as extern.\n"
" Only intern HTML links are checked recursively.\n"
"-f file, --config=file\n"
" Use file as configuration file. Ad default LinkChecker first\n"
" Use file as configuration file. As default LinkChecker first\n"
" searches /etc/linkcheckerrc and then ~/.linkcheckerrc\n"
" (under Windows <path-to-program>\\linkcheckerrc).\n"
"-F type[/filename], --file-output=type[/filename]\n"
@ -179,12 +180,13 @@ msgstr ""
"\n"
"OPTIONEN\n"
"-a, --anchors\n"
" Prüfe interne URLs. Standard ist keine Prüfung.\n"
" Prüfe HTTP Anker Verweise. Standard ist keine Prüfung.\n"
"-d, --denyallow\n"
" Tausche die Prüfreihenfolge zu extern/intern. Standardmäßige\n"
" Reihenfolge ist intern/extern.\n"
"-D, --debug\n"
" Drucke zusätzlich Debug Information.\n"
" Gebe zusätzliche Debug-Information aus. Geben Sie diese Option\n"
" mehrere Male an, um noch mehr Debug-Informationen zu erhalten.\n"
"-e regex, --extern=regex\n"
" Behandle URLs welche diesen Ausdruck matchen als extern.\n"
" Nur interne HTTP Links werden rekursiv geprüft.\n"
@ -323,13 +325,13 @@ msgid "Info"
msgstr "Info"
msgid "Hit RETURN to finish"
msgstr ""
msgstr "Drücken Sie RETURN zum Beenden"
msgid "illegal recursionlevel number %d"
msgstr "illegale recursionlevel Nummer %d"
msgid "Remote host has closed connection"
msgstr ""
msgstr "Entfernter Rechner hat die Verbindung geschlossen"
msgid "parenturl"
msgstr "Tats. URL"

View file

@ -98,18 +98,19 @@ msgid ""
"For single-letter option arguments the space is not a necessity. So\n"
"'-o colored' is the same as '-ocolored'.\n"
"-a, --anchors\n"
" Check anchor references. Default is don't check anchors.\n"
" Check HTTP anchor references. Default is don't check anchors.\n"
"-d, --denyallow\n"
" Swap checking order to extern/intern. Default checking order\n"
" is intern/extern.\n"
"-D, --debug\n"
" Print additional debugging information.\n"
" Print debugging information. Provide this option multiple times\n"
" for even more debugging information.\n"
"-e regex, --extern=regex\n"
" Assume urls that match the given expression as extern.\n"
" Only intern HTML links are checked recursively.\n"
"-f file, --config=file\n"
" Use file as configuration file. LinkChecker first searches\n"
" ~/.linkcheckerrc and then /etc/linkcheckerrc\n"
" Use file as configuration file. As default LinkChecker first\n"
" searches /etc/linkcheckerrc and then ~/.linkcheckerrc\n"
" (under Windows <path-to-program>\\linkcheckerrc).\n"
"-F type[/filename], --file-output=type[/filename]\n"
" Same as -o, but write to a file linkchecker-out.<type>\n"