diff --git a/MANIFEST.in b/MANIFEST.in index 38f29201..1cd60efa 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -10,6 +10,5 @@ include debian/copyright include debian/control include debian/dirs include debian/docs -include debian/files include DNS/README recursive-include test *.html *.py diff --git a/Makefile b/Makefile index 4b63989f..80250e61 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ VERSION=$(shell ./setup.py --version) -#HOST=treasure.calvinsplayground.de -#PROXY= +HOST=treasure.calvinsplayground.de +PROXY= #PROXY=-P$(HOST):5050 -HOST=fsinfo.cs.uni-sb.de -PROXY=-Pwww-proxy.uni-sb.de:3128 +#HOST=fsinfo.cs.uni-sb.de +#PROXY=-Pwww-proxy.uni-sb.de:3128 PACKAGE = linkchecker DEBPACKAGE = $(PACKAGE)_$(VERSION)_i386.deb ALLPACKAGES = ../$(DEBPACKAGE) @@ -33,5 +33,5 @@ test: rm -f test/*.result @for i in test/*.html; do \ echo "Testing $$i. Results are in $$i.result"; \ - ./$(PACKAGE) -t0 -N"news.rz.uni-sb.de" -v -a $$i > $$i.result 2>&1; \ + ./$(PACKAGE) -r1 -o text -t0 -N"news.rz.uni-sb.de" -v -a $$i > $$i.result 2>&1; \ done diff --git a/linkcheck/MailtoUrlData.py b/linkcheck/MailtoUrlData.py index 8bee114a..494931ab 100644 --- a/linkcheck/MailtoUrlData.py +++ b/linkcheck/MailtoUrlData.py @@ -22,18 +22,18 @@ from UrlData import LinkCheckerException # regular expression strings for partially RFC822 compliant adress scanning # XXX far from complete mail adress scanning; enhance only when needed! -word = r"[-\w%']+" -words = r"[-\w%'\s]+" +word = r"[-\w%'!]+" +words = r"[-\w%'!\s]+" dotwords = r"(%s(?:\.%s)*)" % (word,word) adress = "%s@%s" % (dotwords, dotwords) route_adress = "%s<%s>" % (words, adress) mailbox = "(%s|%s)" % (adress, route_adress) -mailboxes = "%s?(,%s)*" % (mailbox, mailbox) +mailboxes = "%s?(\s*,\s*%s)*" % (mailbox, mailbox) # regular expression strings for RFC2368 compliant mailto: scanning header = word+"="+word headers = r"(?:\?%s(&%s)*)?" % (header, header) -mailto = "^mailto:"+mailboxes+headers +mailto = "^mailto:"+mailboxes+headers+"$" # compiled adress_re = re.compile(adress) diff --git a/linkchecker.bat.tmpl b/linkchecker.bat.tmpl new file mode 100644 index 00000000..5482f751 --- /dev/null +++ b/linkchecker.bat.tmpl @@ -0,0 +1,4 @@ +@echo off + +rem Limited to 9 parameters? Is there a $* for Windows? +python "$path_to_linkchecker" %1 %2 %3 %4 %5 %6 %7 %8 %9 diff --git a/setup.py b/setup.py index fd9125c9..7ab24494 100755 --- a/setup.py +++ b/setup.py @@ -21,12 +21,12 @@ from distutils.dist import Distribution from Template import Template import sys,os,string -# Autodetect the existence of an SSL library (this is pretty shitty) class LCDistribution(Distribution): default_include_dirs = ['/usr/include/openssl', '/usr/local/include/openssl'] def run_commands (self): self.check_ssl() + self.replace_in_scripts() for cmd in self.commands: self.run_command (cmd) @@ -52,6 +52,14 @@ class LCDistribution(Distribution): return d return 0 + def replace_in_scripts(self): + inst = self.find_command_obj("install") + inst.ensure_ready() + t = Template("linkchecker.bat.tmpl") + f = open("linkchecker.bat","w") + f.write(t.fill_in({"path_to_linkchecker": inst.install_scripts})) + f.close() + setup (name = "linkchecker", version = "1.2.3", diff --git a/test/mail.html b/test/mail.html index e8469070..7790ca36 100644 --- a/test/mail.html +++ b/test/mail.html @@ -6,9 +6,9 @@ 2 3 4 -5 - -3 6 + +5 +3