add coding line

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@933 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2003-07-04 14:24:44 +00:00
parent 0e4fca4572
commit 308ceb45c5
66 changed files with 120 additions and 2 deletions

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""ANSI Color definitions and functions"""
# Copyright (C) 2000-2003 Bastian Kleineidam
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""read/write Comma Separated Values (CSV)"""
# CSV 0.17 8 June 1999 Copyright ©Laurence Tratt 1998 - 1999
# e-mail: tratt@dcs.kcl.ac.uk

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""store metadata and options"""
# Copyright (C) 2000-2003 Bastian Kleineidam
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""
$Id$
@ -254,6 +255,9 @@ class DnsAsyncRequest(DnsRequest,asyncore.dispatcher_with_send):
#
# $Log$
# Revision 1.6 2003/07/04 14:23:22 calvin
# add coding line
#
# Revision 1.5 2003/01/05 17:39:19 calvin
# pychecker fixes
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""
$Id$
@ -34,6 +35,9 @@ def classstr(klass):
#
# $Log$
# Revision 1.4 2003/07/04 14:23:22 calvin
# add coding line
#
# Revision 1.3 2002/11/26 23:27:43 calvin
# update to Python >= 2.2.1
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""
$Id$
@ -630,6 +631,9 @@ if __name__ == "__main__":
testpacker()
#
# $Log$
# Revision 1.5 2003/07/04 14:23:22 calvin
# add coding line
#
# Revision 1.4 2003/01/05 17:39:19 calvin
# pychecker fixes
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""
$Id$
@ -29,6 +30,9 @@ def opcodestr(opcode):
#
# $Log$
# Revision 1.4 2003/07/04 14:23:22 calvin
# add coding line
#
# Revision 1.3 2002/11/26 23:27:43 calvin
# update to Python >= 2.2.1
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""
$Id$
@ -40,6 +41,9 @@ def statusstr(status):
#
# $Log$
# Revision 1.4 2003/07/04 14:23:22 calvin
# add coding line
#
# Revision 1.3 2002/11/26 23:27:43 calvin
# update to Python >= 2.2.1
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""
$Id$
@ -52,6 +53,9 @@ def typestr(type):
return typemap.get(type, `type`)
#
# $Log$
# Revision 1.4 2003/07/04 14:23:22 calvin
# add coding line
#
# Revision 1.3 2002/11/26 23:27:43 calvin
# update to Python >= 2.2.1
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
# $Id$
#
# This file is part of the pydns project.
@ -20,6 +21,9 @@ Result = DnsResult
#
# $Log$
# Revision 1.7 2003/07/04 14:23:22 calvin
# add coding line
#
# Revision 1.6 2003/01/05 17:52:53 calvin
# fix
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
# $Id$
#
# This file is part of the pydns project.
@ -30,6 +31,9 @@ def mxlookup(name):
#
# $Log$
# Revision 1.4 2003/07/04 14:23:22 calvin
# add coding line
#
# Revision 1.3 2002/11/26 23:27:43 calvin
# update to Python >= 2.2.1
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""
$Id$
@ -113,6 +114,9 @@ if __name__=="__main__":
#
# $Log$
# Revision 1.2 2003/07/04 14:23:22 calvin
# add coding line
#
# Revision 1.1 2002/11/26 23:27:43 calvin
# update to Python >= 2.2.1
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""Handle local file: links"""
# Copyright (C) 2000-2003 Bastian Kleineidam
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""Handle FTP links"""
# Copyright (C) 2000-2003 Bastian Kleineidam
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""Handle Gopher links"""
# Copyright (C) 2000-2003 Bastian Kleineidam
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""Base handle for links with a hostname"""
# Copyright (C) 2000-2003 Bastian Kleineidam
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""Handle http links"""
# Copyright (C) 2000-2003 Bastian Kleineidam
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""Handle https links"""
# Copyright (C) 2000-2003 Bastian Kleineidam
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""Handle for uncheckable application-specific links"""
# Copyright (C) 2001-2003 Bastian Kleineidam
#
@ -60,3 +61,6 @@ class IgnoredUrlData (UrlData):
def _check (self):
self.setWarning(i18n._("%s url ignored")%self.scheme.capitalize())
self.logMe()
def hasContent (self):
return 0

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""Handle for mailto: links"""
# Copyright (C) 2000-2003 Bastian Kleineidam
#
@ -120,3 +121,8 @@ class MailtoUrlData (HostCheckingUrlData):
def getCacheKey (self):
return "%s:%s" % (self.scheme, str(self.adresses))
def hasContent (self):
return 0

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""Handle nntp: and news: links"""
# Copyright (C) 2000-2003 Bastian Kleineidam
#
@ -91,3 +92,7 @@ class NntpUrlData (UrlData):
def getCacheKey (self):
return self.url
def hasContent (self):
return 0

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2000-2003 Bastian Kleineidam
#
# This program is free software; you can redistribute it and/or modify

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""various string utils"""
# Copyright (C) 2000-2003 Bastian Kleineidam
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""Handle telnet: links"""
# Copyright (C) 2000-2003 Bastian Kleineidam
#
@ -56,3 +57,8 @@ class TelnetUrlData (HostCheckingUrlData):
self.urlConnection.write(self.password+"\n")
# XXX how to tell if we are logged in??
self.urlConnection.write("exit\n")
def hasContent (self):
return 0

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""Threading support"""
# Copyright (C) 2000-2003 Bastian Kleineidam
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""Base URL handler"""
# Copyright (C) 2000-2003 Bastian Kleineidam
#
@ -398,6 +399,7 @@ class UrlData:
# sure to test it first.
return self.valid and \
self.isHtml() and \
self.hasContent() and \
not self.cached and \
(self.config["recursionlevel"] >= 0 and
self.recursionLevel < self.config["recursionlevel"]) and \
@ -406,7 +408,7 @@ class UrlData:
def checkAnchors (self, anchor):
debug(HURT_ME_PLENTY, "checking anchor", anchor)
if not (self.valid and anchor and self.isHtml()):
if not (self.valid and anchor and self.isHtml() and self.hasContent()):
return
h = LinkParser(self.getContent(), {'a': ['name'], None: ['id']})
for cur_anchor,line,column,name,base in h.urls:
@ -450,6 +452,11 @@ class UrlData:
return (1,0)
def hasContent (self):
"""indicate wether url getContent() can be called"""
return 1
def getContent (self):
"""Precondition: urlConnection is an opened URL."""
if not self.has_content:
@ -464,6 +471,8 @@ class UrlData:
def checkContent (self, warningregex):
"""if a warning expression was given, call this function to check it
against the content of this url"""
if not self.hasContent():
return
match = warningregex.search(self.getContent())
if match:
self.setWarning(i18n._("Found %s in link contents") % \

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""main function module for link checking"""
# Copyright (C) 2000-2003 Bastian Kleineidam
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2000-2003 Bastian Kleineidam
#
# This program is free software; you can redistribute it and/or modify

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
#------------------------------------------------------------------------
# Copyright (c) 1998 by Total Control Software
# All Rights Reserved

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""internationalization support"""
# Copyright (C) 2000-2003 Bastian Kleineidam
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""common CGI functions used by the CGI scripts"""
# Copyright (C) 2000-2003 Bastian Kleineidam
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2001-2003 Bastian Kleineidam
#
# This program is free software; you can redistribute it and/or modify

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2001-2003 Bastian Kleineidam
#
# This program is free software; you can redistribute it and/or modify

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2000-2003 Bastian Kleineidam
#
# This program is free software; you can redistribute it and/or modify

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2000-2003 Bastian Kleineidam
#
# This program is free software; you can redistribute it and/or modify

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2000-2003 Bastian Kleineidam
#
# This program is free software; you can redistribute it and/or modify

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2000-2003 Bastian Kleineidam
#
# This program is free software; you can redistribute it and/or modify

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2000-2003 Bastian Kleineidam
#
# This program is free software; you can redistribute it and/or modify

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2000-2003 Bastian Kleineidam
#
# This program is free software; you can redistribute it and/or modify

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2000-2003 Bastian Kleineidam
#
# This program is free software; you can redistribute it and/or modify

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2000-2003 Bastian Kleineidam
#
# This program is free software; you can redistribute it and/or modify

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""Output logging support for different formats"""
# Copyright (C) 2000-2003 Bastian Kleineidam
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""Fast HTML parser module written in C"""
# Copyright (C) 2000-2002 Bastian Kleineidam
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""A parser for HTML"""
# Copyright (C) 2000-2003 Bastian Kleineidam
#

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
""" robotparser.py
Copyright (C) 2000 Bastian Kleineidam

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
# sz_fcgi.py - Multithreaded FastCGI Wrapper
__version__ = "v0.8 19/10/1998 ajung"
__doc__ = "Multithreaded FastCGI Wrapper"

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""Supporting definitions for the Python regression test."""
import linkcheck
from linkcheck.log.Logger import Logger

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
####
# Copyright 2000,2001 by Timothy O'Malley <timo@alum.mit.edu>

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
"""spam"""
# Copyright (C) 2000-2003 Bastian Kleineidam
#

View file

@ -1,4 +1,5 @@
#!/usr/bin/python -O
# -*- coding: iso-8859-1 -*-
"""check HTML pages for broken links"""
# Copyright (C) 2000-2002 Bastian Kleineidam
#

View file

@ -1,5 +1,5 @@
#!/usr/bin/python
# -*- coding: iso-8859-1 -*-
# Written by Martin v. Löwis <loewis@informatik.hu-berlin.de>
"""Generate binary message catalog from textual translation description.

View file

@ -1,4 +1,5 @@
#!/usr/bin/python -O
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2000-2002 Bastian Kleineidam
#
@ -114,6 +115,7 @@ class MyDistribution (Distribution):
def create_conf_file (self, directory, data=[]):
data.insert(0, "# this file is automatically created by setup.py")
data.insert(0, "# -*- coding: iso-8859-1 -*-")
if not directory:
directory = os.getcwd()
filename = os.path.join(directory, self.config_file)

View file

@ -1 +1,2 @@
# -*- coding: iso-8859-1 -*-
"Dummy file to make this directory a package."

View file

@ -1,4 +1,5 @@
#!/usr/bin/python
# -*- coding: iso-8859-1 -*-
"""print headers of an url"""
import httplib, urlparse, sys

View file

@ -1,4 +1,5 @@
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
import sys, os
sys.path.insert(0, os.getcwd())
from linkcheck.parser.htmllib import HtmlPrinter

View file

@ -1,4 +1,5 @@
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
# this file is _not_ the original Python2 regression test suite.

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
import os, linkcheck
config = linkcheck.Config.Configuration()
config.addLogger('test', linkcheck.test_support.TestLogger)

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
import os, linkcheck
config = linkcheck.Config.Configuration()
config.addLogger('test', linkcheck.test_support.TestLogger)

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
import os, linkcheck
config = linkcheck.Config.Configuration()
config.addLogger('test', linkcheck.test_support.TestLogger)

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
import os, linkcheck
config = linkcheck.Config.Configuration()
config.addLogger('test', linkcheck.test_support.TestLogger)

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
import os, linkcheck
config = linkcheck.Config.Configuration()
config.addLogger('test', linkcheck.test_support.TestLogger)

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
import os, linkcheck
config = linkcheck.Config.Configuration()
config.addLogger('test', linkcheck.test_support.TestLogger)

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
import os, linkcheck
config = linkcheck.Config.Configuration()
config.addLogger('test', linkcheck.test_support.TestLogger)

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
import os, linkcheck
config = linkcheck.Config.Configuration()
config.addLogger('test', linkcheck.test_support.TestLogger)

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
import os, linkcheck
config = linkcheck.Config.Configuration()
config.addLogger('test', linkcheck.test_support.TestLogger)

View file

@ -1,3 +1,4 @@
# -*- coding: iso-8859-1 -*-
import os, linkcheck
config = linkcheck.Config.Configuration()
config.addLogger('test', linkcheck.test_support.TestLogger)