From fa058602bca98aa79f2ecdb224b599f5f43da6e2 Mon Sep 17 00:00:00 2001 From: calvin Date: Tue, 29 Feb 2000 16:45:11 +0000 Subject: [PATCH] color logger fixes git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@19 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- ChangeLog | 3 ++- Makefile | 2 +- debian/changelog | 41 +++++++++++++++++++++++---------------- debian/control | 6 ++++-- debian/files | 2 +- debian/postinst.debhelper | 4 ++-- debian/prerm.debhelper | 4 ++-- linkcheck/Logging.py | 23 ++++++++++++---------- 8 files changed, 49 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index 23b2da2e..10bd5eb2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,13 +1,14 @@ 29.2.2000 * GML output additions * HTTPS support + * Colored output fixes 28.2.2000 * the patched PyLR parser generator works * wrote a GML parser 25.2.2000 - * changed the name to LinkChecker. My old Java LinkChecker will + * changed the name to LinkChecker; my old Java LinkChecker will disappear because I do not maintain it anymore 21.2.2000 diff --git a/Makefile b/Makefile index e8254d2f..31134ff8 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ SSL_INCLDIR = -I/usr/include/openssl SSL_LIBDIR = -L/usr/lib CC = gcc -CFLAGS = -O2 -Wall +CFLAGS = -O6 -Wall LDFLAGS = -shared $(SSL_LIBDIR) $(PY_LIBDIR) CPPFLAGS = $(SSL_INCLDIR) $(PY_INCLDIR) diff --git a/debian/changelog b/debian/changelog index a7fcd282..67225268 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,94 +1,101 @@ -pylice (0.9.0) unstable; urgency=low +linkchecker (1.1.0) unstable; urgency=low + + * See ChangeLog + * Renamed this project from pylice to LinkChecker + + -- Bastian Kleineidam Tue, 29 Feb 2000 16:58:58 +0100 + +linkchecker (0.9.0) unstable; urgency=low * See ChangeLog -- Bastian Kleineidam Mon, 21 Feb 2000 16:26:22 +0100 -pylice (0.8.0) unstable; urgency=low +linkchecker (0.8.0) unstable; urgency=low * See ChangeLog -- Bastian Kleineidam Thu, 10 Feb 2000 21:32:55 +0000 -pylice (0.7.0) unstable; urgency=low +linkchecker (0.7.0) unstable; urgency=low * See CHANGES -- Bastian Kleineidam Thu, 27 Jan 2000 23:15:24 +0100 -pylice (0.6.2) unstable; urgency=low +linkchecker (0.6.2) unstable; urgency=low * See CHANGES -- Bastian Kleineidam Wed, 26 Jan 2000 11:41:28 +0100 -pylice (0.6.1) unstable; urgency=low +linkchecker (0.6.1) unstable; urgency=low * See CHANGES -- Bastian Kleineidam Tue, 25 Jan 2000 21:11:15 +0100 -pylice (0.6.0) unstable; urgency=low +linkchecker (0.6.0) unstable; urgency=low * See CHANGES -- Bastian Kleineidam Wed, 19 Jan 2000 00:25:55 +0100 -pylice (0.5.0) unstable; urgency=low +linkchecker (0.5.0) unstable; urgency=low * See CHANGES -- Bastian Kleineidam Tue, 18 Jan 2000 00:39:31 +0100 -pylice (0.4.4) unstable; urgency=low +linkchecker (0.4.4) unstable; urgency=low * See CHANGES -- Bastian Kleineidam Mon, 17 Jan 2000 12:21:10 +0100 -pylice (0.4.3) unstable; urgency=low +linkchecker (0.4.3) unstable; urgency=low * See CHANGES -- Bastian Kleineidam Fri, 14 Jan 2000 02:10:20 +0100 -pylice (0.4.2) unstable; urgency=low +linkchecker (0.4.2) unstable; urgency=low * See CHANGES -- Bastian Kleineidam Thu, 13 Jan 2000 21:48:23 +0100 -pylice (0.4.1) unstable; urgency=low +linkchecker (0.4.1) unstable; urgency=low * See CHANGES -- Bastian Kleineidam Wed, 12 Jan 2000 13:34:42 +0100 -pylice (0.4.0) unstable; urgency=low +linkchecker (0.4.0) unstable; urgency=low * See CHANGES -- Bastian Kleineidam Tue, 11 Jan 2000 13:48:53 +0100 -pylice (0.3.0) unstable; urgency=low +linkchecker (0.3.0) unstable; urgency=low * See CHANGES -- Bastian Kleineidam Tue, 11 Jan 2000 00:01:37 +0100 -pylice (0.2.1) unstable; urgency=low +linkchecker (0.2.1) unstable; urgency=low * See CHANGES -- Bastian Kleineidam Mon, 10 Jan 2000 22:01:54 +0100 -pylice (0.2.0) unstable; urgency=low +linkchecker (0.2.0) unstable; urgency=low * See CHANGES -- Bastian Kleineidam Mon, 10 Jan 2000 21:28:38 +0100 -pylice (0.1.0) unstable; urgency=low +linkchecker (0.1.0) unstable; urgency=low * New release. Missing features: robots.txt exclusion standard, proxy setting, user/password setting and @@ -96,7 +103,7 @@ pylice (0.1.0) unstable; urgency=low -- Bastian Kleineidam Sun, 9 Jan 2000 14:32:15 +0100 -pylice (0.0.1) unstable; urgency=low +linkchecker (0.0.1) unstable; urgency=low * Initial Release. diff --git a/debian/control b/debian/control index fb76c2f5..65ed4459 100644 --- a/debian/control +++ b/debian/control @@ -7,14 +7,16 @@ Standards-Version: 3.0.1 Package: linkchecker Architecture: any Depends: python-base +Suggests: libssl09, libssl09-dev Description: LinkChecker is a link checker written in Python With LinkChecker you can check your HTML documents for broken links. Features: o recursive checking o multithreaded o output can be colored or normal text, HTML, SQL or a GML sitemap graph - o HTTP, FTP, mailto:, Gopher, Telnet and local file links are supported - Javascript and HTTPS links are currently ignored + o HTTP/1.1 and 1.0, HTTPS, FTP, mailto:, Gopher, Telnet and + local file links are supported + Javascript links are currently ignored o restrict link checking to your local domain o HTTP proxy support o give username/password for HTTP and FTP authorization diff --git a/debian/files b/debian/files index a9e09633..c2b2bb64 100644 --- a/debian/files +++ b/debian/files @@ -1 +1 @@ -pylice_0.8.0_i386.deb web optional +linkchecker_1.1.0_i386.deb web optional diff --git a/debian/postinst.debhelper b/debian/postinst.debhelper index 97f86883..3d4ce363 100644 --- a/debian/postinst.debhelper +++ b/debian/postinst.debhelper @@ -1,7 +1,7 @@ # Automatically added by dh_installdocs if [ "$1" = "configure" ]; then - if [ -d /usr/doc -a ! -e /usr/doc/pylice -a -d /usr/share/doc/pylice ]; then - ln -sf ../share/doc/pylice /usr/doc/pylice + if [ -d /usr/doc -a ! -e /usr/doc/linkchecker -a -d /usr/share/doc/linkchecker ]; then + ln -sf ../share/doc/linkchecker /usr/doc/linkchecker fi fi # End automatically added section diff --git a/debian/prerm.debhelper b/debian/prerm.debhelper index 41a515f5..4f0570f6 100644 --- a/debian/prerm.debhelper +++ b/debian/prerm.debhelper @@ -1,5 +1,5 @@ # Automatically added by dh_installdocs -if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/pylice ]; then - rm -f /usr/doc/pylice +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/linkchecker ]; then + rm -f /usr/doc/linkchecker fi # End automatically added section diff --git a/linkcheck/Logging.py b/linkcheck/Logging.py index e9c80fe0..53b1877d 100644 --- a/linkcheck/Logging.py +++ b/linkcheck/Logging.py @@ -3,14 +3,14 @@ import sys,time,Config,StringUtil # ANSI color codes ESC="\x1b" COL_PARENT =ESC+"[37m" # white -COL_URL =ESC+"[35m" # magenta -COL_REAL =ESC+"[35m" # magenta -COL_BASE =ESC+"[36m" # cyan +COL_URL =ESC+"[0m" # standard +COL_REAL =ESC+"[36m" # cyan +COL_BASE =ESC+"[35m" # magenty COL_VALID =ESC+"[1;32m" # green COL_INVALID =ESC+"[1;31m" # red -COL_INFO =ESC+"[0;37m" # standard +COL_INFO =ESC+"[0m" # standard COL_WARNING =ESC+"[1;33m" # yellow -COL_DLTIME =ESC+"[0;37m" # standard +COL_DLTIME =ESC+"[0m" # standard COL_RESET =ESC+"[0m" # reset to standard # HTML colors @@ -214,20 +214,23 @@ class ColoredLogger(StandardLogger): if self.prefix: self.fd.write("o\n") self.fd.write("\nParent URL "+COL_PARENT+urlData.parentName+\ - COL_RESET+"\n") - self.prefix = 1 + COL_RESET+"\n") self.currentPage = urlData.parentName + self.prefix = 1 else: + if self.prefix: + self.fd.write("o\n") self.prefix = 0 + self.currentPage=None if self.prefix: self.fd.write("|\n+- ") else: self.fd.write("\n") self.fd.write("URL "+COL_URL+urlData.urlName+COL_RESET) - if urlData.line: self.fd.write(" (line "+`urlData.line`+")") + if urlData.line: self.fd.write(", line "+`urlData.line`+"") if urlData.cached: - self.fd.write("(cached)\n") + self.fd.write(" (cached)\n") else: self.fd.write("\n") @@ -266,7 +269,7 @@ class ColoredLogger(StandardLogger): if self.prefix: self.fd.write("| ") - self.fd.write("Result ") + self.fd.write("Result ") if urlData.valid: self.fd.write(COL_VALID+urlData.validString+COL_RESET+"\n") else: